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.

Showing 1-10 of 69 results. Next

A305800 Filter sequence for a(prime) = constant sequences.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 14 2018

Keywords

Comments

Restricted growth sequence transform of A239968.
In the following, A stands for this sequence, A305800, and S -> T (where S and T are sequence A-numbers) indicates that for all i, j: S(i) = S(i) => T(i) = T(j).
For example, the following implications hold:
A -> A300247 -> A305897 -> A077462 -> A101296,
A -> A290110 -> A300250 -> A101296.

Crossrefs

Differs from A296073 for the first time at n=125, as a(125) = 96, while A296073(125) = 33.
Cf. also A305900, A305801, A295300, A289626 for other "upper level" filters.

Programs

  • Mathematica
    Join[{1},Table[If[PrimeQ[n],2,1+n-PrimePi[n]],{n,2,150}]] (* Harvey P. Dale, Jul 12 2019 *)
  • PARI
    A305800(n) = if(1==n,n,if(isprime(n),2,1+n-primepi(n)));

Formula

a(1) = 1; for n > 1, a(n) = 2 for prime n, and a(n) = 1+n-A000720(n) for composite n.

A324400 Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j) for all i, j >= 1, where f(n) = -1 if n = 2^k and k > 0, and f(n) = n for all other numbers.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 01 2019

Keywords

Comments

In the following, A stands for this sequence, A324400, and S -> T (where S and T are sequence A-numbers) indicates that for all i, j >= 1: S(i) = S(i) => T(i) = T(j).
For example, the following chains of implications hold:
A -> A286619 -> A005811,
and
A -> A003602 -> A286622 -> A000120,
-> A323889,
-> A000593,
-> A001227,
among many others.

Crossrefs

Programs

  • PARI
    A000523(n) = if(n<1, 0, #binary(n)-1);
    A324400(n) = if(n<4,n,if(!bitand(n,n-1),2,1+n-A000523(n)));

Formula

If n <= 3, a(n) = n; and for n >= 4, if A209229(n) = 1, then a(n) = 2, otherwise a(n) = 1 + n - A000523(n).

A305900 Filter sequence for a(primes > 3) = constant sequences.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 14 2018

Keywords

Comments

For all i, j:
a(i) = a(j) => A305801(i) = A305801(j) => A305800(i) = A305800(j).
a(i) = a(j) => A007949(i) = A007949(j).
a(i) = a(j) => A305893(i) = A305893(j).

Crossrefs

Cf. also A305901, A305902, A305903 (this filter applied to various permutations of N).

Programs

  • PARI
    A305900(n) = if(n<=5,n,if(isprime(n),5,3+n-primepi(n)));

Formula

For n <= 5, a(n) = n, for >= 5, a(n) = 5 when n is a prime, and a(n) = 3+n-A000720(n) when n is a composite.

A295300 Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = [A003557(n), A046523(n), A048250(n)].

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 19 2017

Keywords

Comments

Restricted growth sequence transform of A291752.
For all i, j:
a(i) = a(j) => A291751(i) = A291751(j),
a(i) = a(j) => A326199(i) = A326199(j) => A294877(i) = A294877(j),
a(i) = a(j) => A322021(i) = A322021(j),
a(i) = a(j) => A295888(i) = A295888(j),
a(i) = a(j) => A296090(i) = A296090(j).

Crossrefs

Programs

  • PARI
    up_to = 100000;
    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; };
    A003557(n) = n/factorback(factor(n)[, 1]); \\ From A003557
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A048250(n) = if(n<1, 0, sumdiv(n, d, if(core(d)==d, d)));
    A291750(n) = (1/2)*(2 + ((A003557(n)+A048250(n))^2) - A003557(n) - 3*A048250(n));
    Aux295300(n) = (1/2)*(2 + ((A046523(n) + A291750(n))^2) - A046523(n) - 3*A291750(n));
    v295300 = rgs_transform(vector(up_to,n,Aux295300(n)));
    A295300(n) = v295300[n];

Extensions

Name changed and the comments section added by Antti Karttunen, Jul 13 2019

A305891 Filter sequence combining 2-adic valuation (A007814) and the prime signature (A046523) of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 14 2018

Keywords

Comments

Restricted growth sequence transform of A286161, of the ordered pair [A007814(n), A046523(n)].
For all i, j: a(i) = a(j) => A291761(i) = A291761(j).

Crossrefs

Cf. also A305893.

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; };
    A007814(n) = valuation(n,2);
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    Aux305891(n) = [A007814(n), A046523(n)];
    v305891 = rgs_transform(vector(up_to,n,Aux305891(n)));
    A305891(n) = v305891[n];

A319704 Filter sequence which records for primes their residue modulo 4, and for all other numbers assigns a unique number.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 26 2018

Keywords

Comments

Restricted growth sequence transform of function f defined as f(n) = A010873(n) when n is a prime, otherwise -n.
For all i, j:
a(i) = a(j) => A010873(i) = A010873(j),
a(i) = a(j) => A305801(i) = A305801(j),
a(i) = a(j) => A319714(i) = A319714(j).

Crossrefs

Cf. A002145 (positions of 3's), A002144 (positions of 5's).
Cf. also A319350, A319705, A319706.

Programs

  • PARI
    up_to = 100000;
    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; };
    A319704aux(n) = if(isprime(n),-(n%4),n);
    v319704 = rgs_transform(vector(up_to,n,A319704aux(n)));
    A319704(n) = v319704[n];

A322591 Lexicographically earliest such sequence a that for all i, j, a(i) = a(j) => f(i) = f(j), where f(n) = 0 for odd primes, and A007947(n) for any other number.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 18 2018

Keywords

Comments

For all i, j:
a(i) = a(j) => A066086(i) = A066086(j),
a(i) = a(j) => A322354(i) = A322354(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; };
    A007947(n) = factorback(factorint(n)[, 1]);
    Aux322591(n) = if((n>2)&&isprime(n),0,A007947(n));
    v322591 = rgs_transform(vector(up_to, n, Aux322591(n)));
    A322591(n) = v322591[n];

A319701 Filter sequence for sequences that are constant for all odd terms >= 3.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 02 2018

Keywords

Comments

For all i, j:
A305801(i) = A305801(j) => A305890(i) = A305890(j) => a(i) = a(j).
a(i) = a(j) => A007814(i) = A007814(j) => A000035(i) = A000035(j).

Crossrefs

Programs

  • PARI
    A319701(n) = if(n<=2, n, if(n%2, 3, 2+(n/2)));

Formula

a(1) = 1, and for n > 1, if n is odd, a(n) = 3, otherwise [when n is even], a(n) = 2+(n/2).

A323371 Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j) where f(n) = A295886(n) for all other numbers, except f(n) = 0 for odd primes.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 13 2019

Keywords

Comments

Restricted growth sequence transform of function f, defined as f(n) = 0 when n is an odd prime, and f(n) = [A003557(n), A023900(n)] for all other numbers.
For all i, j:
A323370(i) = A323370(j) => a(i) = a(j),
A323405(i) = A323405(j) => a(i) = a(j),
a(i) = a(j) => A092248(i) = A092248(j),
a(i) = a(j) => A319340(i) = A319340(j),
a(i) = a(j) => A322587(i) = A322587(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; };
    A003557(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 2] = max(0,f[i, 2]-1)); factorback(f); };
    A023900(n) = sumdivmult(n, d, d*moebius(d)); \\ From A023900
    Aux323371(n) = if((n>2)&&isprime(n),0,[A003557(n), A023900(n)]);
    v323371 = rgs_transform(vector(up_to, n, Aux323371(n)));
    A323371(n) = v323371[n];

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

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 01 2019

Keywords

Comments

For all i, j:
A305801(i) = A305801(j) => a(i) = a(j),
a(i) = a(j) => A305976(i) = A305976(j) => A001221(i) = A001221(j),
a(i) = a(j) => A322591(i) = A322591(j),
a(i) = a(j) => A323235(i) = A323235(j),
a(i) = a(j) => A324399(i) = A324399(j),
a(i) = a(j) => A297159(i) = A297159(j).

Crossrefs

Programs

  • PARI
    A000523(n) = if(n<1, 0, #binary(n)-1);
    A324401(n) = if(n<4,n,if(isprime(n),3,if(!bitand(n,n-1),4,4+n-A000523(n)-primepi(n))));
    
  • 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; };
    Aux324401(n) = if((n>2) && (isprime(n)||!bitand(n,n-1)),-(2-(n%2)),n);
    \\ Equally: Aux324401(n) = if(n<=2,n,if(isprime(n),-1,if(!bitand(n,n-1),-2,n)));
    v324401 = rgs_transform(vector(up_to, n, Aux324401(n)));
    A324401(n) = v324401[n];

Formula

If n <= 2, a(n) = n, for n > 2, if n is an odd prime, a(n) = 3, if n = 2^k, with k >= 2, a(n) = 4, otherwise a(n) = 4 + n - A000523(n) - A000720(n).
Showing 1-10 of 69 results. Next