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-9 of 9 results.

A322822 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 a Fermi-Dirac prime (A050376) > 2, and f(n) = A300840(n) for all other numbers.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 29 2018

Keywords

Comments

For all i, j: a(i) = a(j) => A322823(i) = A322823(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; };
    ispow2(n) = (n && !bitand(n,n-1));
    A302777(n) = ispow2(isprimepower(n));
    A050376list(up_to) = { my(v=vector(up_to), i=0); for(n=1,oo,if(A302777(n), i++; v[i] = n); if(i == up_to,return(v))); };
    v050376 = A050376list(up_to);
    A050376(n) = v050376[n];
    A052330(n) = { my(p=1,i=1); while(n>0, if(n%2, p *= A050376(i)); i++; n >>= 1); (p); };
    A052331(n) = { my(s=0,e); while(n > 1, fordiv(n, d, if(((n/d)>1)&&ispow2(isprimepower(n/d)), e = vecsearch(v050376, n/d); if(!e, print("v050376 too short!"); return(1/0)); s += 2^(e-1); n = d; break))); (s); };
    A300840(n) = A052330(A052331(n)>>1);
    A322822aux(n) = if((2==n),-1,if(A302777(n),0,A300840(n)));
    v322822 = rgs_transform(vector(up_to,n,A322822aux(n)));
    A322822(n) = v322822[n];

A323082 Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n) = -(n mod 2) if n is a prime, and f(n) = A300840(n) for any other number.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 04 2019

Keywords

Comments

For all i, j: A323074(i) = A323074(j) => a(i) = a(j).
Like the related A322822 also this filter sequence satisfies the following two implications, for all i, j >= 1:
a(i) = a(j) => A322356(i) = A322356(j),
a(i) = a(j) => A290105(i) = A290105(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; };
    ispow2(n) = (n && !bitand(n,n-1));
    A302777(n) = ispow2(isprimepower(n));
    A050376list(up_to) = { my(v=vector(up_to), i=0); for(n=1,oo,if(A302777(n), i++; v[i] = n); if(i == up_to,return(v))); };
    v050376 = A050376list(up_to);
    A050376(n) = v050376[n];
    A052330(n) = { my(p=1,i=1); while(n>0, if(n%2, p *= A050376(i)); i++; n >>= 1); (p); };
    A052331(n) = { my(s=0,e); while(n > 1, fordiv(n, d, if(((n/d)>1)&&A302777(n/d), e = vecsearch(v050376, n/d); if(!e, print("v050376 too short!"); return(1/0)); s += 2^(e-1); n = d; break))); (s); };
    A300840(n) = A052330(A052331(n)>>1);
    A323082aux(n) = if(isprime(n),-(n%2),A300840(n));
    v323082 = rgs_transform(vector(up_to,n,A323082aux(n)));
    A323082(n) = v323082[n];

A322823 a(n) = 0 if n is 1 or a Fermi-Dirac prime (A050376), otherwise a(n) = 1 + a(A300840(n)).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 2, 0, 0, 1, 0, 3, 2, 1, 0, 2, 0, 1, 2, 3, 0, 2, 0, 1, 2, 1, 4, 3, 0, 1, 2, 3, 0, 2, 0, 3, 4, 1, 0, 2, 0, 1, 2, 3, 0, 2, 4, 3, 2, 1, 0, 3, 0, 1, 5, 3, 4, 2, 0, 3, 2, 4, 0, 3, 0, 1, 2, 3, 5, 2, 0, 4, 0, 1, 0, 3, 4, 1, 2, 3, 0, 4, 5, 3, 2, 1, 4, 2, 0, 1, 6, 3, 0, 2, 0, 3, 4
Offset: 1

Views

Author

Antti Karttunen, Dec 29 2018

Keywords

Comments

For n > 1, a(n) gives the number of edges needed to traverse from n to reach the leftmost branch (where the terms of A050376 are located) in the binary tree illustrated in A052330.

Crossrefs

Programs

  • PARI
    up_to = 10000;
    ispow2(n) = (n && !bitand(n,n-1));
    A302777(n) = ispow2(isprimepower(n));
    A050376list(up_to) = { my(v=vector(up_to), i=0); for(n=1,oo,if(A302777(n), i++; v[i] = n); if(i == up_to,return(v))); };
    v050376 = A050376list(up_to);
    A050376(n) = v050376[n];
    A052330(n) = { my(p=1,i=1); while(n>0, if(n%2, p *= A050376(i)); i++; n >>= 1); (p); };
    A052331(n) = { my(s=0,e); while(n > 1, fordiv(n, d, if(((n/d)>1)&&ispow2(isprimepower(n/d)), e = vecsearch(v050376, n/d); if(!e, print("v050376 too short!"); return(1/0)); s += 2^(e-1); n = d; break))); (s); };
    A300840(n) = A052330(A052331(n)>>1);
    A322823(n) = if((1==n)||(1==A302777(n)),0,1+A322823(A300840(n)));

Formula

a(1) = 0; for n > 1, if A302777(n) == 1, a(n) = 0, otherwise a(n) = 1 + a(A300840(n)).

A323074 Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n) = -(n mod 4) if n is a prime, and f(n) = A300840(n) for any other number.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 04 2019

Keywords

Comments

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

Crossrefs

Programs

  • PARI
    up_to = 65539;
    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; };
    ispow2(n) = (n && !bitand(n,n-1));
    A302777(n) = ispow2(isprimepower(n));
    A050376list(up_to) = { my(v=vector(up_to), i=0); for(n=1,oo,if(A302777(n), i++; v[i] = n); if(i == up_to,return(v))); };
    v050376 = A050376list(up_to);
    A050376(n) = v050376[n];
    A052330(n) = { my(p=1,i=1); while(n>0, if(n%2, p *= A050376(i)); i++; n >>= 1); (p); };
    A052331(n) = { my(s=0,e); while(n > 1, fordiv(n, d, if(((n/d)>1)&&A302777(n/d), e = vecsearch(v050376, n/d); if(!e, print("v050376 too short!"); return(1/0)); s += 2^(e-1); n = d; break))); (s); };
    A300840(n) = A052330(A052331(n)>>1);
    A323074aux(n) = if(isprime(n),-(n%4),A300840(n));
    v323074 = rgs_transform(vector(up_to,n,A323074aux(n)));
    A323074(n) = v323074[n];

A300841 Fermi-Dirac factorization prime shift towards larger terms: a(n) = A052330(2*A052331(n)).

Original entry on oeis.org

1, 3, 4, 5, 7, 12, 9, 15, 11, 21, 13, 20, 16, 27, 28, 17, 19, 33, 23, 35, 36, 39, 25, 60, 29, 48, 44, 45, 31, 84, 37, 51, 52, 57, 63, 55, 41, 69, 64, 105, 43, 108, 47, 65, 77, 75, 49, 68, 53, 87, 76, 80, 59, 132, 91, 135, 92, 93, 61, 140, 67, 111, 99, 85, 112, 156, 71, 95, 100, 189, 73, 165, 79, 123, 116, 115, 117, 192, 81
Offset: 1

Views

Author

Antti Karttunen, Apr 12 2018

Keywords

Comments

With n having a unique factorization as A050376(i) * A050376(j) * ... * A050376(k), with i, j, ..., k all distinct, a(n) = A050376(1+i) * A050376(1+j) * ... * A050376(1+k).
Multiplicative because for coprime m and n the Fermi-Dirac factorizations of m and n are disjoint and their union is the Fermi-Dirac factorization of m * n. - Andrew Howroyd, Aug 02 2018

Examples

			For n = 6 = A050376(1)*A050376(2), a(6) = A050376(2)*A050376(3) = 3*4 = 12.
For n = 12 = A050376(2)*A050376(3), a(12) = A050376(3)*A050376(4) = 4*5 = 20.
		

Crossrefs

Cf. A050376, A052330, A052331, A059897, A300840 (a left inverse).
Cf. also A003961.
Range of values is A003159.

Programs

  • Mathematica
    fdPrimeQ[n_] := Module[{f = FactorInteger[n], e}, Length[f] == 1 && (2^IntegerExponent[(e = f[[1, 2]]), 2] == e)];
    nextFDPrime[n_] := Module[{k = n + 1}, While[! fdPrimeQ[k], k++]; k];
    fd[p_, e_] := Module[{b = IntegerDigits[e, 2]}, m = Length[b]; Table[If[b[[j]] > 0, p^(2^(m - j)), Nothing], {j, 1, m}]];
    a[n_] := Times @@ nextFDPrime /@ Flatten[fd @@@ FactorInteger[n]]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Sep 07 2023 *)
  • PARI
    up_to_e = 8192;
    v050376 = vector(up_to_e);
    A050376(n) = v050376[n];
    ispow2(n) = (n && !bitand(n,n-1));
    i = 0; for(n=1,oo,if(ispow2(isprimepower(n)), i++; v050376[i] = n); if(i == up_to_e,break));
    A052330(n) = { my(p=1,i=1); while(n>0, if(n%2, p *= A050376(i)); i++; n >>= 1); (p); };
    A052331(n) = { my(s=0,e); while(n > 1, fordiv(n, d, if(((n/d)>1)&&ispow2(isprimepower(n/d)), e = vecsearch(v050376, n/d); if(!e, print("v050376 too short!"); return(1/0)); s += 2^(e-1); n = d; break))); (s); };
    A300841(n) = A052330(2*A052331(n));

Formula

a(n) = A052330(2*A052331(n)).
For all n >= 1, a(A050376(n)) = A050376(1+n).
For all n >= 1, A300840(a(n)) = n.
a(A059897(n,k)) = A059897(a(n), a(k)). - Peter Munn, Nov 23 2019

A302024 Permutation of natural numbers mapping "Fermi-Dirac factorization" to ordinary factorization: a(1) = 1, a(2*A300841(n)) = 2*a(n), a(A300841(n)) = A003961(a(n)).

Original entry on oeis.org

1, 2, 3, 5, 7, 4, 11, 6, 13, 10, 17, 9, 19, 14, 15, 23, 29, 22, 31, 25, 21, 26, 37, 8, 41, 34, 33, 35, 43, 12, 47, 38, 39, 46, 49, 55, 53, 58, 51, 18, 59, 20, 61, 65, 77, 62, 67, 57, 71, 74, 69, 85, 73, 28, 91, 30, 87, 82, 79, 27, 83, 86, 121, 95, 119, 44, 89, 115, 93, 50, 97, 42, 101, 94, 111, 145, 143, 52, 103, 133, 107, 106, 109, 45, 161
Offset: 1

Views

Author

Antti Karttunen, Apr 15 2018

Keywords

Comments

Because "Fermi-Dirac factorization" is fundamentally different from ordinary prime factorization (as no exponents larger than 1 are allowed) this pair of permutations mapping between them is not always very intuitive. For example, we have ("as expected") A302776(n) = A302023(A052126(A302024(n))), while on the other hand, we have A302792(n) = A300841(A302023(A032742(A302024(n)))), where an additional shift-operator A300841 is needed for "correction".

Crossrefs

Programs

  • PARI
    up_to = 32768;
    v050376 = vector(up_to);
    A050376(n) = v050376[n];
    ispow2(n) = (n && !bitand(n,n-1));
    i = 0; for(n=1,oo,if(ispow2(isprimepower(n)), i++; v050376[i] = n); if(i == up_to,break));
    A052331(n) = { my(s=0,e); while(n > 1, fordiv(n, d, if(((n/d)>1)&&ispow2(isprimepower(n/d)), e = vecsearch(v050376, n/d); if(!e, print("v050376 too short!"); return(1/0)); s += 2^(e-1); n = d; break))); (s); };
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ Modified from code of M. F. Hasler
    A302024(n) = A005940(1+A052331(n));

Formula

a(n) = A005940(1+A052331(n)).
a(A050376(n)) = A000040(n).
A001221(a(n)) = A302790(n).
A001222(a(n)) = A064547(n).

A305422 GF(2)[X] factorization prime shift towards smaller terms.

Original entry on oeis.org

1, 1, 2, 1, 4, 2, 3, 1, 6, 4, 7, 2, 11, 3, 8, 1, 16, 6, 13, 4, 5, 7, 22, 2, 19, 11, 12, 3, 14, 8, 25, 1, 50, 16, 29, 6, 31, 13, 28, 4, 37, 5, 38, 7, 24, 22, 41, 2, 9, 19, 32, 11, 26, 12, 47, 3, 44, 14, 55, 8, 59, 25, 10, 1, 20, 50, 61, 16, 21, 29, 118, 6, 67, 31, 88, 13, 110, 28, 53, 4, 69, 37, 18, 5, 64, 38, 73, 7, 94, 24, 87, 22, 43, 41, 52, 2, 91
Offset: 1

Views

Author

Antti Karttunen, Jun 07 2018

Keywords

Comments

Let a x b stand for the carryless binary multiplication of positive integers a and b, that is, the result of operation A048720(a,b). With n having a unique factorization as f(i) x f(j) x ... x f(k), with 1 <= i <= j <= ... <= k, a(n) = f(i-1) x f(j-1) x ... x f(k-1), where f(0) = 1, and f(n) = A014580(n) for n >= 1.

Crossrefs

Cf. A000079 (positions of ones), A014580, A091225, A268389, A305419, A305421, A305424 (odd bisection), A305425.
Cf. also A064989, A300840.

Programs

  • PARI
    A091225(n) = polisirreducible(Pol(binary(n))*Mod(1, 2));
    A305419(n) = if(n<3,1, my(k=n-1); while(k>1 && !A091225(k),k--); (k));
    A305422(n) = { my(f = subst(lift(factor(Pol(binary(n))*Mod(1, 2))),x,2)); for(i=1,#f~,f[i,1] = Pol(binary(A305419(f[i,1])))); fromdigits(Vec(factorback(f))%2,2); };

Formula

For all n >= 1:
a(A305421(n)) = n.
a(A001317(n)) = A000079(n).
A007814(a(n)) = A268389(n).

A322990 a(n) = A289272(floor(A289271(n)/2)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 01 2019

Keywords

Comments

For all n > 1, in the binary tree illustrated in A289272, the node which contains (has value) n, its parent node has value a(n).
Each n occurs exactly twice in this sequence.

Crossrefs

Programs

  • PARI
    A289271(n) = { my(v=0,i=0,x=1); for(d=2,oo,if(n==1, return(v)); if(1==gcd(x,d)&&1==omega(d), if(!(n%d)&&1==gcd(d,n/d), v += 2^i; n /= d; x *= d); i++)); }; \\ After Rémy Sigrist's program for A289271.
    A289272(n) = { my(m=1, pp=1); while(n>0, pp++; while(!isprimepower(pp)||(gcd(pp,m)>1), pp++); if(n%2, m *= pp); n >>=1); (m); };
    A322990(n) = A289272(A289271(n)>>1);

Formula

a(n) = A289272(floor(A289271(n)/2)).

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.
Showing 1-9 of 9 results.