cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 11-20 of 28 results. Next

A286610 Restricted growth sequence computed for Euler totient function phi, A000010.

Original entry on oeis.org

1, 1, 2, 2, 3, 2, 4, 3, 4, 3, 5, 3, 6, 4, 7, 7, 8, 4, 9, 7, 6, 5, 10, 7, 11, 6, 9, 6, 12, 7, 13, 8, 11, 8, 14, 6, 15, 9, 14, 8, 16, 6, 17, 11, 14, 10, 18, 8, 17, 11, 19, 14, 20, 9, 16, 14, 15, 12, 21, 8, 22, 13, 15, 19, 23, 11, 24, 19, 25, 14, 26, 14, 27, 15, 16, 15, 22, 14, 28, 19, 29, 16, 30, 14, 31, 17, 32, 16, 33, 14, 27, 25, 22, 18, 27, 19, 34, 17, 22
Offset: 1

Views

Author

Antti Karttunen, May 11 2017

Keywords

Examples

			Construction: we start with a(1)=1 for phi(1)=1 (where phi = A000010), and then after, for all n > 1, whenever the value of phi(n) has not been encountered before, we set a(n) to the least natural number k not already in sequence among a(1) .. a(n-1), otherwise [whenever phi(n) = phi(m), for some m < n], we set a(n) = a(m), i.e., to the same value that was assigned to a(m).
For n=2, phi(2) = 1, which value was already encountered as phi(1), thus we set also a(2) = 1.
For n=3, phi(3) = 2, which has not been encountered before, thus we allot for a(3) the least so far unused number, which is 2, thus a(3) = 2.
For n=4, phi(4) = 2, which was already encountered as at n=3 for the first time, thus we set a(4) = a(3) = 2.
For n=5, phi(5) = 4, which has not been encountered before, thus we allot for a(5) the least so far unused number, which is now 3, thus a(5) = 3.
		

Crossrefs

Cf. A000010, A210719 (positions of records, and also the first occurrence of each n).
Cf. also A101296, A286603, A286605, A286619, A286621, A286622, A286626, A286378 for similarly constructed sequences.

Programs

  • Mathematica
    With[{nn = 99}, Function[s, Table[Position[Keys@ s, k_ /; MemberQ[k, n]][[1, 1]], {n, nn}]]@ Map[#1 -> #2 & @@ # &, Transpose@ {Values@ #, Keys@ #}] &@ PositionIndex@ Array[EulerPhi, nn]] (* Michael De Vlieger, May 12 2017, Version 10 *)
  • PARI
    rgs_transform(invec) = { my(occurrences = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(occurrences,invec[i]), my(pp = mapget(occurrences, invec[i])); outvec[i] = outvec[pp] , mapput(occurrences,invec[i],i); outvec[i] = u; u++ )); outvec; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A000010(n) = eulerphi(n);
    write_to_bfile(1,rgs_transform(vector(10000,n,A000010(n))),"b286610.txt");

A286605 Restricted growth sequence computed for number of divisors, d(n) (A000005).

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 4, 3, 4, 2, 5, 2, 4, 4, 6, 2, 5, 2, 5, 4, 4, 2, 7, 3, 4, 4, 5, 2, 7, 2, 5, 4, 4, 4, 8, 2, 4, 4, 7, 2, 7, 2, 5, 5, 4, 2, 9, 3, 5, 4, 5, 2, 7, 4, 7, 4, 4, 2, 10, 2, 4, 5, 11, 4, 7, 2, 5, 4, 7, 2, 10, 2, 4, 5, 5, 4, 7, 2, 9, 6, 4, 2, 10, 4, 4, 4, 7, 2, 10, 4, 5, 4, 4, 4, 10, 2, 5, 5, 8, 2, 7, 2, 7, 7, 4, 2, 10, 2, 7, 4, 9, 2, 7, 4, 5, 5, 4, 4
Offset: 1

Views

Author

Antti Karttunen, May 11 2017

Keywords

Comments

For all i, j: A101296(i) = A101296(j) => a(i) = a(j).
For all i, j: a(i) = a(j) <=> A000005(i) = A000005(j).

Crossrefs

Cf. A000005, A007416 (positions of records, and also the first occurrence of each n).

Programs

  • Mathematica
    With[{nn = 119}, Function[s, Table[Position[Keys@ s, k_ /; MemberQ[k, n]][[1, 1]], {n, nn}]]@ Map[#1 -> #2 & @@ # &, Transpose@ {Values@ #, Keys@ #}] &@ PositionIndex@ Array[DivisorSigma[0, #] &, nn]] (* Michael De Vlieger, May 12 2017, Version 10 *)
  • PARI
    rgs_transform(invec) = { my(occurrences = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(occurrences,invec[i]), my(pp = mapget(occurrences, invec[i])); outvec[i] = outvec[pp] , mapput(occurrences,invec[i],i); outvec[i] = u; u++ )); outvec; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A000005(n) = numdiv(n);
    write_to_bfile(1,rgs_transform(vector(10000,n,A000005(n))),"b286605.txt");

A322809 Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n) = -1 if n is an odd prime, and f(n) = floor(n/2) for all other numbers.

Original entry on oeis.org

1, 2, 3, 4, 3, 5, 3, 6, 6, 7, 3, 8, 3, 9, 9, 10, 3, 11, 3, 12, 12, 13, 3, 14, 14, 15, 15, 16, 3, 17, 3, 18, 18, 19, 19, 20, 3, 21, 21, 22, 3, 23, 3, 24, 24, 25, 3, 26, 26, 27, 27, 28, 3, 29, 29, 30, 30, 31, 3, 32, 3, 33, 33, 34, 34, 35, 3, 36, 36, 37, 3, 38, 3, 39, 39, 40, 40, 41, 3, 42, 42, 43, 3, 44, 44, 45, 45, 46, 3, 47, 47, 48, 48, 49, 49, 50, 3, 51, 51, 52, 3, 53, 3, 54, 54
Offset: 1

Views

Author

Antti Karttunen, Dec 26 2018

Keywords

Comments

This sequence is a restricted growth sequence transform of a function f which is defined as f(n) = A004526(n), unless n is an odd prime, in which case f(n) = -1, which is a constant not in range of A004526. See the Crossrefs section for a list of similar sequences.
For all i, j:
A305801(i) = A305801(j) => a(i) = a(j),
a(i) = a(j) => A039636(i) = A039636(j).
For all i, j: a(i) = a(j) <=> A323161(i+1) = A323161(j+1).
The shifted version of this filter, A323161, has a remarkable ability to find many sequences related to primes and prime chains. - Antti Karttunen, Jan 06 2019

Crossrefs

A list of few similarly constructed sequences follows, where each sequence is an rgs-transform of such function f, for which the value of f(n) is the n-th term of the sequence whose A-number follows after a parenthesis, unless n is of the form ..., in which case f(n) is given a constant value outside of the range of that sequence:
A322809 (A004526, unless an odd prime) [This sequence],
A322589 (A007913, unless an odd prime),
A322591 (A007947, unless an odd prime),
A322805 (A252463, unless an odd prime),
A323082 (A300840, unless an odd prime),
A322822 (A300840, unless n > 2 and a Fermi-Dirac prime, A050376),
A322988 (A322990, unless a prime power > 2),
A323078 (A097246, unless an odd prime),
A322808 (A097246, unless a squarefree number > 2),
A322816 (A048675, unless an odd prime),
A322807 (A285330, unless an odd prime),
A322814 (A286621, unless an odd prime),
A322824 (A242424, unless an odd prime),
A322973 (A006370, unless an odd prime),
A322974 (A049820, unless n > 1 and n is in A046642),
A323079 (A060681, unless an odd prime),
A322587 (A295887, unless an odd prime),
A322588 (A291751, unless an odd prime),
A322592 (A289625, unless an odd prime),
A323369 (A323368, unless an odd prime),
A323371 (A295886, unless an odd prime),
A323374 (A323373, unless an odd prime),
A323401 (A323372, unless an odd prime),
A323405 (A323404, unless an odd prime).

Programs

  • PARI
    up_to = 65537;
    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; };
    A322809aux(n) = if((n>2)&&isprime(n),-1,(n>>1));
    v322809 = rgs_transform(vector(up_to,n,A322809aux(n)));
    A322809(n) = v322809[n];

Formula

a(n) = A323161(n+1) - 1.

A336146 Lexicographically earliest infinite sequence such that a(i) = a(j) => A000035(i) = A000035(j) and A000265(i) = A000265(j), for all i, j >= 1.

Original entry on oeis.org

1, 2, 3, 2, 4, 5, 6, 2, 7, 8, 9, 5, 10, 11, 12, 2, 13, 14, 15, 8, 16, 17, 18, 5, 19, 20, 21, 11, 22, 23, 24, 2, 25, 26, 27, 14, 28, 29, 30, 8, 31, 32, 33, 17, 34, 35, 36, 5, 37, 38, 39, 20, 40, 41, 42, 11, 43, 44, 45, 23, 46, 47, 48, 2, 49, 50, 51, 26, 52, 53, 54, 14, 55, 56, 57, 29, 58, 59, 60, 8, 61, 62, 63, 32, 64, 65, 66, 17, 67, 68, 69, 35, 70, 71, 72, 5, 73, 74, 75, 38, 76, 77, 78, 20, 79
Offset: 1

Views

Author

Antti Karttunen, Jul 12 2020

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A000035(n), A000265(n)] (parity and the odd part of n), or equally, of the ordered pair [A000265(n), A278221(n)].
For all i, j:
A324400(i) = A324400(j) => a(i) = a(j),
a(i) = a(j) => A336126(i) = A336126(j),
a(i) = a(j) => A336147(i) = A336147(j),
a(i) = a(j) => A336148(i) = A336148(j),
a(i) = a(j) => A336149(i) = A336149(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    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; };
    A000035(n) = (n%2);
    A000265(n) = (n>>valuation(n,2));
    Aux336146(n) = [A000035(n), A000265(n)];
    v336146 = rgs_transform(vector(up_to, n, Aux336146(n)));
    A336146(n) = v336146[n];

A336149 Lexicographically earliest infinite sequence such that a(i) = a(j) => A278221(i) = A278221(j) and A278222(i) = A278222(j), for all i, j >= 1.

Original entry on oeis.org

1, 2, 3, 2, 4, 5, 6, 2, 7, 8, 9, 5, 10, 11, 12, 2, 13, 14, 15, 8, 16, 17, 18, 5, 19, 20, 21, 11, 22, 23, 24, 2, 25, 26, 27, 14, 28, 29, 30, 8, 31, 32, 33, 17, 34, 35, 36, 5, 37, 38, 39, 20, 40, 41, 42, 11, 43, 44, 45, 23, 46, 47, 48, 2, 49, 50, 51, 26, 52, 53, 54, 14, 55, 56, 34, 29, 57, 58, 59, 8, 60, 61, 62, 32, 63, 64, 65, 17, 66, 67, 68, 35, 69, 70, 71, 5, 72, 27, 73, 38, 74, 75, 76, 20, 77
Offset: 1

Views

Author

Antti Karttunen, Jul 12 2020

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A278221(n), A278222(n)], i.e., of the ordered pair [A046523(A122111(n)), A046523(A005940(1+n))].
For all i, j: A336146(i) = A336146(j) => a(i) = a(j) => A035531(i) = A035531(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    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; };
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A122111(n) = if(1==n,n,prime(bigomega(n))*A122111(A064989(n)));
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
    A278221(n) = A046523(A122111(n));
    A278222(n) = A046523(A005940(1+n));
    Aux336149(n) = [A278221(n),A278222(n)];
    v336149 = rgs_transform(vector(up_to, n, Aux336149(n)));
    A336149(n) = v336149[n];

A350064 Lexicographically earliest infinite sequence such that a(i) = a(j) => A350062(i) = A350062(j), for all i, j >= 1.

Original entry on oeis.org

1, 2, 3, 3, 4, 3, 5, 3, 6, 4, 7, 3, 8, 3, 6, 6, 9, 3, 10, 3, 11, 6, 12, 3, 11, 6, 6, 6, 13, 6, 14, 3, 6, 6, 11, 5, 15, 3, 16, 6, 17, 3, 18, 3, 6, 19, 20, 3, 19, 4, 16, 3, 21, 3, 22, 3, 16, 11, 23, 3, 24, 6, 6, 11, 11, 6, 25, 6, 6, 3, 26, 6, 27, 6, 6, 6, 19, 6, 28, 3, 16, 6, 29, 11, 30, 16, 31, 19, 32, 11, 33, 6, 30, 30, 30
Offset: 1

Views

Author

Antti Karttunen, Jan 29 2022

Keywords

Comments

Restricted growth sequence transform of A350062.
For all i, j >= 1: a(i) = a(j) => A324105(i) = A324105(j).
For all i, j >= 2:
a(i) = a(j) => A324119(i) = A324119(j),
a(i) = a(j) => A342655(i) = A342655(j).

Crossrefs

Programs

  • PARI
    up_to = 3000;
    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; };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A156552(n) = { my(f = factor(n), p, p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res };
    A350062(n) = if(1==n,0,A046523(A156552(n)));
    v350064 = rgs_transform(vector(up_to, n, A350062(n)));
    A350064(n) = v350064[n];

A318890 Filter sequence combining the prime signature of n (A046523) with the prime signature of its conjugated prime factorization (A278221).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 10, 15, 16, 12, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 14, 33, 34, 35, 36, 37, 38, 39, 40, 41, 18, 42, 43, 44, 45, 18, 46, 47, 48, 22, 31, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 39, 63, 64, 65, 66, 18, 67, 20, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 53, 36, 80, 81, 82, 83, 84, 85, 26, 86, 87, 88, 89, 90, 91, 39
Offset: 1

Views

Author

Antti Karttunen, Sep 16 2018

Keywords

Comments

Restricted growth sequence transform of A286454.
For all i, j: a(i) = a(j) => A318891(i) = A318891(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    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; };
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A122111(n) = if(1==n,n,prime(bigomega(n))*A122111(A064989(n)));
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A278221(n) = A046523(A122111(n));
    A318890aux(n) = [A046523(n), A278221(n)];
    v318890 = rgs_transform(vector(up_to,n,A318890aux(n)));
    A318890(n) = v318890[n];

A336148 Lexicographically earliest infinite sequence such that a(i) = a(j) => A278221(i) = A278221(j) and A336158(i) = A336158(j), for all i, j >= 1.

Original entry on oeis.org

1, 2, 3, 2, 4, 5, 6, 2, 7, 8, 9, 5, 10, 11, 12, 2, 13, 14, 15, 8, 16, 17, 18, 5, 19, 20, 21, 11, 22, 23, 24, 2, 25, 26, 27, 14, 28, 29, 30, 8, 31, 32, 33, 17, 34, 35, 36, 5, 37, 38, 39, 20, 40, 41, 25, 11, 42, 43, 44, 23, 45, 46, 47, 2, 48, 49, 50, 26, 51, 32, 52, 14, 53, 54, 34, 29, 55, 56, 57, 8, 58, 59, 60, 32, 61, 62, 63, 17, 64, 65, 30, 35, 66, 67, 68, 5, 69, 70, 71, 38, 72, 73, 74, 20, 75
Offset: 1

Views

Author

Antti Karttunen, Jul 12 2020

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A278221(n), A336158(n)], i.e., of the ordered pair [A046523(A122111(n)), A046523(A000265(n))].
For all i, j: A324400(i) = A324400(j) => A336146(i) = A336146(j) => a(i) = a(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    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; };
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A122111(n) = if(1==n,n,prime(bigomega(n))*A122111(A064989(n)));
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
    A278221(n) = A046523(A122111(n));
    A000265(n) = (n>>valuation(n,2));
    A336158(n) = A046523(A000265(n));
    Aux336148(n) = [A278221(n),A336158(n)];
    v336148 = rgs_transform(vector(up_to, n, Aux336148(n)));
    A336148(n) = v336148[n];

A336315 The number of divisors in the conjugated prime factorization of n: a(n) = A000005(A122111(n)).

Original entry on oeis.org

1, 2, 3, 2, 4, 4, 5, 2, 3, 6, 6, 4, 7, 8, 6, 2, 8, 4, 9, 6, 9, 10, 10, 4, 4, 12, 3, 8, 11, 8, 12, 2, 12, 14, 8, 4, 13, 16, 15, 6, 14, 12, 15, 10, 6, 18, 16, 4, 5, 6, 18, 12, 17, 4, 12, 8, 21, 20, 18, 8, 19, 22, 9, 2, 16, 16, 20, 14, 24, 12, 21, 4, 22, 24, 6, 16, 10, 20, 23, 6, 3, 26, 24, 12, 20, 28, 27, 10, 25, 8, 15, 18, 30, 30, 24
Offset: 1

Views

Author

Antti Karttunen, Jul 18 2020

Keywords

Crossrefs

Programs

  • PARI
    A336315(n) = if(1==n,n,my(p=apply(primepi,factor(n)[,1]~),m=1+p[1]); for(i=2, #p, m *= (1+p[i]-p[i-1])); (m));

Formula

a(n) = A000005(A122111(n)).
a(n) = A336316(n) + A034444(n).

A322814 Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(2) = -1, f(n) = 0 if n is an odd prime, and f(n) = A278221(n) for all other numbers.

Original entry on oeis.org

1, 2, 3, 4, 3, 5, 3, 4, 6, 7, 3, 5, 3, 8, 7, 4, 3, 5, 3, 7, 9, 10, 3, 5, 11, 12, 6, 8, 3, 13, 3, 4, 14, 15, 8, 5, 3, 16, 17, 7, 3, 18, 3, 10, 7, 19, 3, 5, 20, 7, 21, 12, 3, 5, 14, 8, 22, 23, 3, 13, 3, 24, 9, 4, 25, 26, 3, 15, 27, 18, 3, 5, 3, 28, 7, 16, 10, 29, 3, 7, 6, 30, 3, 18, 31, 32, 33, 10, 3, 13, 17, 19, 34, 35, 36, 5, 3, 8, 14, 7, 3, 37, 3, 12, 18
Offset: 1

Views

Author

Antti Karttunen, Dec 27 2018

Keywords

Comments

For all i, j: a(i) = a(j) => A001221(i) = A001221(j).

Crossrefs

Programs

  • PARI
    up_to = 4096;
    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; };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A122111(n) = if(1==n,n,prime(bigomega(n))*A122111(A064989(n)));
    A322814aux(n) = if(2==n,-1,if(isprime(n),0,A046523(A122111(n))));
    v322814 = rgs_transform(vector(up_to,n,A322814aux(n)));
    A322814(n) = v322814[n];
Previous Showing 11-20 of 28 results. Next