login
A305979
Filter sequence for a(Fermi-Dirac primes) = constant sequences.
4
1, 2, 2, 2, 2, 3, 2, 4, 2, 5, 2, 6, 2, 7, 8, 2, 2, 9, 2, 10, 11, 12, 2, 13, 2, 14, 15, 16, 2, 17, 2, 18, 19, 20, 21, 22, 2, 23, 24, 25, 2, 26, 2, 27, 28, 29, 2, 30, 2, 31, 32, 33, 2, 34, 35, 36, 37, 38, 2, 39, 2, 40, 41, 42, 43, 44, 2, 45, 46, 47, 2, 48, 2, 49, 50, 51, 52, 53, 2, 54, 2, 55, 2, 56, 57, 58, 59, 60, 2, 61, 62, 63, 64, 65, 66, 67, 2, 68, 69, 70, 2
OFFSET
1,2
COMMENTS
For all i, j:
a(i) = a(j) => A305976(i) = A305976(j).
a(i) = a(j) => A302791(i) = A302791(j).
LINKS
FORMULA
a(1) = 1; for n > 1, if A302777(n) is 1 [when n is in A050376], a(n) = 2, otherwise a(n) = 1 + n - A302778(n) = running count from 3 onward.
PROG
(PARI)
up_to = 100000;
partialsums(f, up_to) = { my(v = vector(up_to), s=0); for(i=1, up_to, s += f(i); v[i] = s); (v); }
A209229(n) = (n && !bitand(n, n-1));
A302777(n) = A209229(isprimepower(n));
v302778 = partialsums(A302777, up_to);
A302778(n) = v302778[n];
A305979(n) = if(1==n, n, if(1==A302777(n), 2, 1+n-A302778(n)));
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 02 2018
STATUS
approved