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 10 results.

A291767 Odd bisection of A291761.

Original entry on oeis.org

1, 3, 3, 3, 7, 3, 3, 9, 3, 3, 9, 3, 7, 12, 3, 3, 9, 9, 3, 9, 3, 3, 16, 3, 7, 9, 3, 9, 9, 3, 3, 16, 9, 3, 9, 3, 3, 16, 9, 3, 21, 3, 9, 9, 3, 9, 9, 9, 3, 16, 3, 3, 23, 3, 3, 9, 3, 9, 16, 9, 7, 9, 12, 3, 9, 3, 9, 26, 3, 3, 9, 9, 9, 16, 3, 3, 16, 9, 3, 9, 9, 3, 23, 3, 7, 16, 3, 16, 9, 3, 3, 9, 9, 9, 26, 3, 3, 23, 3, 3, 9, 9, 9, 16, 9
Offset: 1

Views

Author

Antti Karttunen, Sep 11 2017

Keywords

Comments

Records occur at positions: 1, 2, 5, 8, 14, 23, 41, 53, 68, 113, 122, 158, 203, 338, 365, ... (= (A147516(n)+1)/2) that give also all distinct values in this sequence: 1, 3, 7, 9, 12, 16, 21, 23, 26, 32, 34, 37, 40, 46, 48, 53, 58, 59, 64, 69, 72, 77, 81, ... Note that the terms of A291768 are all from the complementary sequence: 2, 4, 5, 6, 8, 10, 11, 13, 14, 15, 17, ...

Crossrefs

Programs

Formula

a(n) = A291761(2n - 1).

A291768 Even bisection of A291761.

Original entry on oeis.org

2, 4, 5, 6, 5, 8, 5, 10, 8, 8, 5, 11, 5, 8, 13, 14, 5, 15, 5, 11, 13, 8, 5, 17, 8, 8, 11, 11, 5, 18, 5, 19, 13, 8, 13, 20, 5, 8, 13, 17, 5, 18, 5, 11, 18, 8, 5, 22, 8, 15, 13, 11, 5, 20, 13, 17, 13, 8, 5, 24, 5, 8, 18, 25, 13, 18, 5, 11, 13, 18, 5, 27, 5, 8, 18, 11, 13, 18, 5, 22, 17, 8, 5, 24, 13, 8, 13, 17, 5, 28, 13, 11, 13, 8, 13, 29, 5, 15, 18, 20, 5
Offset: 1

Views

Author

Antti Karttunen, Sep 11 2017

Keywords

Crossrefs

Programs

Formula

a(n) = A291761(2n).

A305801 Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = 0 if n is an odd prime, with f(n) = n for all other n.

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, 19, 20, 21, 3, 22, 3, 23, 24, 25, 26, 27, 3, 28, 29, 30, 3, 31, 3, 32, 33, 34, 3, 35, 36, 37, 38, 39, 3, 40, 41, 42, 43, 44, 3, 45, 3, 46, 47, 48, 49, 50, 3, 51, 52, 53, 3, 54, 3, 55, 56, 57, 58, 59, 3, 60, 61, 62, 3, 63, 64, 65, 66, 67, 3, 68, 69, 70, 71, 72, 73, 74, 3, 75, 76, 77, 3, 78, 3, 79, 80
Offset: 1

Views

Author

Antti Karttunen, Jun 14 2018

Keywords

Comments

The original name was: "Filter sequence for a(odd prime) = constant sequences", which stemmed from the fact that for all i, j, a(i) = a(j) => b(i) = b(j) for any sequence b that obtains a constant value for all odd primes A065091.
For example, we have for all i, j:
a(i) = a(j) => A305800(i) = A305800(j),
a(i) = a(j) => A007814(i) = A007814(j),
a(i) = a(j) => A305891(i) = A305891(j) => A291761(i) = A291761(j).
There are several filter sequences "above" this one (meaning that they have finer equivalence class partitioning), for example, we have, for all i, j:
[where odd primes are further distinguished by]
A305900(i) = A305900(j) => a(i) = a(j), [whether p = 3 or > 3]
A319350(i) = A319350(j) => a(i) = a(j), [A007733(p)]
A319704(i) = A319704(j) => a(i) = a(j), [p mod 4]
A319705(i) = A319705(j) => a(i) = a(j), [A286622(p)]
A331304(i) = A331304(j) => a(i) = a(j), [parity of A000720(p)]
A336855(i) = A336855(j) => a(i) = a(j). [distance to the next larger prime]

Crossrefs

Cf. A305900, A319350, A319704, A319705, A331304, A336855 (sequences with finer equivalence class partitioning).
Cf. also A003602, A103391, A295300, A305795, A324400, A331300, A336460 (for similar constructions or similarly useful sequences).

Programs

  • Mathematica
    Array[If[# <= 2, #, If[PrimeQ[#], 3, 2 + # - PrimePi[#]]] &, 105] (* Michael De Vlieger, Oct 18 2021 *)
  • PARI
    A305801(n) = if(n<=2,n,if(isprime(n),3,2+n-primepi(n)));

Formula

a(1) = 1, a(2) = 2; for n > 2, a(n) = 3 for odd primes, and a(n) = 2+n-A000720(n) for composite n.
For n > 2, a(n) = 1 + A305800(n).

Extensions

Name changed and Comment section rewritten by Antti Karttunen, Oct 17 2021

A300226 Filter sequence combining A046523(n) and A052126(n), the prime signature of n and n/(largest prime dividing n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 01 2018

Keywords

Comments

Restricted growth sequence transform of P(A046523(n), A052126(n)), where P(a,b) is a two-argument form of A000027 used as a Cantor pairing function N x N -> N.

Examples

			a(6) = a(10) (= 4) because both are nonsquare semiprimes (2*3 and 2*5), and when the largest prime factor is divided out, both yield the same quotient, 2.
		

Crossrefs

Cf. also A291761, A300229.

Programs

  • PARI
    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; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A052126(n) = if(1==n,n, my(f=factor(n)[, 1], gpf = f[#f]); n/gpf); \\ After code in A052126.
    Aux300226(n) = (1/2)*(2 + ((A052126(n)+A046523(n))^2) - A052126(n) - 3*A046523(n));
    write_to_bfile(1,rgs_transform(vector(65537,n,Aux300226(n))),"b300226.txt");

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];

A318500 Filter sequence combining A305897 and the parity of n.

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, 7, 18, 19, 20, 3, 21, 3, 22, 23, 24, 11, 25, 3, 26, 27, 28, 3, 29, 3, 30, 31, 32, 3, 33, 7, 34, 35, 36, 3, 37, 15, 38, 39, 40, 3, 41, 3, 42, 43, 44, 23, 45, 3, 46, 47, 48, 3, 49, 3, 50, 51, 52, 11, 53, 3, 54, 55, 56, 3, 57, 27, 58, 59, 60, 3, 61, 15, 62, 63, 64, 35, 65, 3, 66, 67, 68, 3, 69, 3
Offset: 1

Views

Author

Antti Karttunen, Sep 24 2018

Keywords

Comments

Restricted growth sequence transform of ordered pair [A000035(n), A246277(n)], or equally, of ordered pair [A007814(n), A246277(n)].
For all i, j:
A305801(i) = A305801(j) => a(i) = a(j) => A305891(i) = A305891(j) => A291761(i) = A291761(j).

Crossrefs

Programs

  • PARI
    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; };
    A246277(n) = if(1==n, 0, my(f = factor(n), k = primepi(f[1,1])-1); for (i=1, #f~, f[i,1] = prime(primepi(f[i,1])-k)); factorback(f)/2);
    v318500 = rgs_transform(vector(up_to,n,[(n%2),A246277(n)]));
    A318500(n) = v318500[n];

A328470 Lexicographically earliest infinite sequence such that a(i) = a(j) => A046523(i) = A046523(j) and A053669(i) = A053669(j) for all i, j.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 19 2019

Keywords

Comments

Restricted growth sequence transform of A286142, or equally, of the ordered pair [A046523(n), A053669(n)], where A053669(n) gives the smallest prime not dividing n, while A046523(n) gives the prime signature of n.
For all i, j:
A305801(i) = A305801(j) => a(i) = a(j) => A291761(i) = A291761(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; };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
    A053669(n) = forprime(p=2, , if(n%p, return(p))); \\ From A053669
    Aux328470(n) = [A046523(n), A053669(n)];
    v328470 = rgs_transform(vector(up_to, n, Aux328470(n)));
    A328470(n) = v328470[n];

A291762 Restricted growth sequence transform of ((-1)^A000120(n))*A046523(n); filter combining the parity of binary weight with the prime signature of n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 11 2017

Keywords

Comments

Equally, restricted growth sequence transform of sequence b defined as b(1) = 1; b(n) = A046523(n) + A010060(n) for n > 1, which starts as 1, 3, 2, 5, 2, 6, 3, 9, 4, 6, 3, 12, 3, 7, 6, 17, 2, 12, 3, 12, 7, 7, ...

Crossrefs

Cf. A101296, A286163, A291761 (related or similar filtering sequences).
Cf. A027697 (positions of 2's), A027699 (of 3's), A130593 (of 5's and 7's), A230095 (of 9's).
Cf. also A231431, A235001.

Programs

  • PARI
    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; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    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
    write_to_bfile(1,rgs_transform(vector(65537,n,((-1)^hammingweight(n))*A046523(n))),"b291762_upto65537.txt");
    \\ Or alternatively:
    A010060(n) = (hammingweight(n)%2);
    f(n) = if(1==n,n,A046523(n)+A010060(n));
    write_to_bfile(1,rgs_transform(vector(16385,n,f(n))),"b291762.txt");

A328469 Lexicographically earliest infinite sequence such that a(i) = a(j) => A020639(i) = A020639(j) and A046523(i) = A046523(j) for all i, j.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 19 2019

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A020639(n), A046523(n)], where A020639(n) gives the smallest prime factor of n, while A046523(n) gives the prime signature of n.
For all i, j: a(i) = a(j) => A291761(i) = A291761(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; };
    A020639(n) = if(n>1, if(n>n=factor(n, 0)[1, 1], n, factor(n)[1, 1]), 1);
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
    Aux328469(n) = [A020639(n), A046523(n)];
    v328469 = rgs_transform(vector(up_to, n, Aux328469(n)));
    A328469(n) = v328469[n];

A296088 Filter combining sigma(n) with the parity of n; restricted growth sequence transform of ((-1)^n)*A000203(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 07 2017

Keywords

Examples

			For n = 21 and 31 the restricted growth sequence transform assigns the same value (we have a(21) = a(31) = 21) because both numbers are odd, and the sum of their divisors is equal as sigma(21) = sigma(31) = 32.
On the other hand, although sigma(14) = sigma(15) = 24, a(14) != a(15) because the other number is even and the other number is odd. Compare to A286603.
		

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; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    write_to_bfile(1,rgs_transform(vector(up_to,n,((-1)^n)*sigma(n))),"b296088.txt");
Showing 1-10 of 10 results.