login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A305975 Filter sequence: All prime powers p^k, k >= 1, are allotted to distinct equivalence classes according to their exponent k, while all other numbers occur in singular equivalence classes of their own. 5
1, 2, 2, 3, 2, 4, 2, 5, 3, 6, 2, 7, 2, 8, 9, 10, 2, 11, 2, 12, 13, 14, 2, 15, 3, 16, 5, 17, 2, 18, 2, 19, 20, 21, 22, 23, 2, 24, 25, 26, 2, 27, 2, 28, 29, 30, 2, 31, 3, 32, 33, 34, 2, 35, 36, 37, 38, 39, 2, 40, 2, 41, 42, 43, 44, 45, 2, 46, 47, 48, 2, 49, 2, 50, 51, 52, 53, 54, 2, 55, 10, 56, 2, 57, 58, 59, 60, 61, 2, 62, 63, 64, 65, 66, 67, 68, 2, 69, 70, 71 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of A305974.
For all i, j: A305800(i) = A305800(j) => a(i) = a(j) => A305976(i) = A305976(j).
LINKS
FORMULA
a(prime) = 2, a(prime^2) = 3, a(prime^3) = 5, a(prime^4) = 10, a(prime^5) = 19.
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); }
rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om, invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om, invec[i], i); outvec[i] = u; u++ )); outvec; };
v065515 = partialsums(n -> (omega(n)<=1), up_to);
A065515(n) = v065515[n];
A085970(n) = (n - A065515(n));
A305974(n) = if(1==n, n, my(e = isprimepower(n)); if(e, -e, 1+A085970(n)));
v305975 = rgs_transform(vector(up_to, n, A305974(n)));
A305975(n) = v305975[n];
CROSSREFS
Sequence in context: A300248 A300247 A318887 * A304751 A117658 A371446
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 02 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 09:42 EDT 2024. Contains 371935 sequences. (Running on oeis4.)