OFFSET
1,1
COMMENTS
If X is an n-set and Y a fixed (n-5)-subset of X then a(n-5) is equal to the number of 2-subsets of X intersecting Y. - Milan Janjic, Aug 15 2007
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..1000
Graham Everest, Peter Rogers, and Thomas Ward, A higher-rank Mersenne problem, Algorithmic Number Theory: 5th International Symposium, ANTS-V Sydney, Australia, July 7-12, 2002 Proceedings 5, Lect. Notes Computer Sci. 2369, Springer Berlin Heidelberg, 2002, pp. 95-107; alternative link.
Milan Janjić, Two Enumerative Functions.
FORMULA
a(n) = A003586(n) + 1.
EXAMPLE
a(7) = 13 since 13 = 2^2 * 3^1 + 1.
MATHEMATICA
mx = 4000; Sort@ Flatten@ Table[ 2^i*3^j + 1, {i, 0, Log[2, mx]}, {j, 0, Log[3, mx/2^i]}] (* Robert G. Wilson v, Aug 17 2012 *)
PROG
(PARI) is(k) = if(k == 2, 1, k > 2 && vecmax(factor(k - 1, 5)[, 1]) < 5); \\ Amiram Eldar, Sep 02 2024
(Python)
from sympy import integer_log
def A055600(n):
def bisection(f, kmin=0, kmax=1):
while f(kmax) > kmax: kmax <<= 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x): return n+x-sum((x//3**i).bit_length() for i in range(integer_log(x, 3)[0]+1))
return bisection(f, n, n)+1 # Chai Wah Wu, Sep 15 2024
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Henry Bottomley, Jun 01 2000
EXTENSIONS
Offset corrected by Amiram Eldar, Sep 02 2024
STATUS
approved
