|
|
A286252
|
|
Compound filter: a(n) = P(A001511(1+n), A278222(n)), where P(n,k) is sequence A000027 used as a pairing function.
|
|
5
|
|
|
1, 5, 2, 18, 2, 23, 7, 59, 2, 23, 16, 94, 7, 80, 29, 195, 2, 23, 16, 94, 16, 467, 67, 355, 7, 80, 67, 706, 29, 302, 121, 672, 2, 23, 16, 94, 16, 467, 67, 355, 16, 467, 436, 1894, 67, 1832, 277, 1331, 7, 80, 67, 706, 67, 1832, 631, 2779, 29, 302, 277, 2704, 121, 1178, 497, 2422, 2, 23, 16, 94, 16, 467, 67, 355, 16, 467, 436, 1894, 67, 1832, 277, 1331, 16, 467, 436
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
|
|
FORMULA
|
|
|
PROG
|
(PARI)
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ Modified from code of M. F. Hasler
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ This function from Charles R Greathouse IV, Aug 17 2011
for(n=0, 16384, write("b286252.txt", n, " ", A286252(n)));
(Python)
from sympy import prime, factorint
import math
def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
def A(n): return n - 2**int(math.floor(math.log(n, 2)))
def b(n): return n + 1 if n<2 else prime(1 + (len(bin(n)[2:]) - bin(n)[2:].count("1"))) * b(A(n))
def a005940(n): return b(n - 1)
def P(n):
f = factorint(n)
return sorted([f[i] for i in f])
def a046523(n):
x=1
while True:
if P(n) == P(x): return x
else: x+=1
def a278222(n): return a046523(a005940(n + 1))
def a001511(n): return 2 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
def a(n): return T(a001511(n + 1), a278222(n)) # Indranil Ghosh, May 07 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|