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

A344875 Multiplicative with a(2^e) = 2^(1+e) - 1, and a(p^e) = p^e - 1 for odd primes p.

Original entry on oeis.org

1, 3, 2, 7, 4, 6, 6, 15, 8, 12, 10, 14, 12, 18, 8, 31, 16, 24, 18, 28, 12, 30, 22, 30, 24, 36, 26, 42, 28, 24, 30, 63, 20, 48, 24, 56, 36, 54, 24, 60, 40, 36, 42, 70, 32, 66, 46, 62, 48, 72, 32, 84, 52, 78, 40, 90, 36, 84, 58, 56, 60, 90, 48, 127, 48, 60, 66, 112, 44, 72, 70, 120, 72, 108, 48, 126, 60, 72, 78, 124, 80, 120
Offset: 1

Views

Author

Antti Karttunen, Jun 03 2021

Keywords

Crossrefs

Programs

  • Mathematica
    f[2, e_] := 2^(e + 1) - 1; f[p_, e_] := p^e - 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jun 03 2021 *)
  • PARI
    A344875(n) = { my(f=factor(n)~); prod(i=1, #f, (f[1, i]^(f[2, i]+(2==f[1, i]))-1)); };
    
  • Python
    from math import prod
    from sympy import factorint
    def A344875(n): return prod((p**(1+e) if p == 2 else p**e)-1 for p, e in factorint(n).items()) # Chai Wah Wu, Jun 01 2022

Formula

a(n) = A344878(n) * A344879(n).
Multiplicative with a(p^e) = A153151(p^e). - Antti Karttunen, Jul 01 2021
Sum_{k=1..n} a(k) ~ c * n^2, where c = (4/5) * Product_{p prime} (1 - 1/(p*(p+1))) = (4/5) * A065463 = 0.563553... . - Amiram Eldar, Nov 18 2022

A344973 a(n) = A344875(n) mod A011772(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 4, 3, 0, 0, 0, 0, 13, 0, 8, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 9, 0, 10, 0, 0, 16, 0, 0, 0, 16, 0, 6, 5, 20, 0, 30, 0, 0, 15, 6, 0, 24, 0, 42, 0, 0, 0, 11, 0, 28, 21, 0, 23, 5, 0, 0, 21, 12, 0, 57, 0, 0, 0, 14, 18, 0, 0, 60, 0, 0, 0, 36, 30, 40, 27, 22, 0, 26, 7, 16, 0, 44, 15, 0, 0, 0, 36
Offset: 1

Views

Author

Antti Karttunen, Jun 04 2021

Keywords

Crossrefs

Cf. A344974 (positions of zeros).

Programs

  • Mathematica
    b[n_] := If[n == 1, 1, Module[{p, e}, Product[{p, e} = pe;
         If[p == 2, 2^(1 + e) - 1, p^e - 1], {pe, FactorInteger[n]}]]];
    c[n_] := Module[{m = 1}, While[Not[IntegerQ[m (m + 1)/(2 n)]], m++]; m];
    a[n_] := Mod[b[n], c[n]];
    Array[a, 100] (* Jean-François Alcover, Jun 12 2021 *)
  • PARI
    A011772(n) = { if(n==1, return(1)); my(f=factor(if(n%2, n, 2*n)), step=vecmax(vector(#f~, i, f[i, 1]^f[i, 2]))); forstep(m=step, 2*n, step, if(m*(m-1)/2%n==0, return(m-1)); if(m*(m+1)/2%n==0, return(m))); }; \\ From A011772
    A344875(n) = { my(f=factor(n)~); prod(i=1, #f, (f[1, i]^(f[2, i]+(2==f[1, i]))-1)); };
    A344973(n) = (A344875(n)%A011772(n));

Formula

a(n) = A344875(n) mod A011772(n) = A344876(n) mod A011772(n).

A344969 a(n) = gcd(A011772(n), A344875(n)).

Original entry on oeis.org

1, 3, 2, 7, 4, 3, 6, 15, 8, 4, 10, 2, 12, 1, 1, 31, 16, 8, 18, 1, 6, 1, 22, 15, 24, 12, 26, 7, 28, 3, 30, 63, 1, 16, 2, 8, 36, 1, 12, 15, 40, 4, 42, 2, 1, 1, 46, 2, 48, 24, 1, 3, 52, 3, 10, 6, 18, 28, 58, 1, 60, 1, 3, 127, 1, 1, 66, 16, 1, 4, 70, 3, 72, 36, 24, 14, 3, 12, 78, 4, 80, 40, 82, 12, 2, 1, 1, 2, 88, 1, 1, 1, 30
Offset: 1

Views

Author

Antti Karttunen, Jun 03 2021

Keywords

Crossrefs

Programs

  • Mathematica
    A011772[n_] := Module[{m = 1}, While[Not[IntegerQ[m(m+1)/(2n)]], m++]; m];
    A344875[n_] := Product[{p, e} = pe; If[p == 2, 2^(1+e)-1, p^e-1], {pe, FactorInteger[n]}];
    a[n_] := GCD[A011772[n], A344875[n]];
    Array[a, 100] (* Jean-François Alcover, Jun 12 2021 *)
  • PARI
    A011772(n) = { if(n==1, return(1)); my(f=factor(if(n%2, n, 2*n)), step=vecmax(vector(#f~, i, f[i, 1]^f[i, 2]))); forstep(m=step, 2*n, step, if(m*(m-1)/2%n==0, return(m-1)); if(m*(m+1)/2%n==0, return(m))); }; \\ From A011772
    A344875(n) = { my(f=factor(n)~); prod(i=1, #f, (f[1, i]^(f[2, i]+(2==f[1, i]))-1)); };
    A344969(n) = gcd(A011772(n), A344875(n));

Formula

a(n) = gcd(A011772(n), A344875(n)).
a(n) = gcd(A011772(n), A344876(n)) = gcd(A344875(n), A344876(n)) = gcd(A011772(n), A344973(n)).

A344976 a(n) = A344878(n) - A011772(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 3, 0, 0, 0, 8, 0, 6, 0, -1, -1, 0, 0, 16, 0, 13, 0, 19, 0, 15, 0, 0, 0, 35, 0, -3, 0, 0, -1, 32, -2, 48, 0, -1, 0, 45, 0, -14, 0, 38, -1, 43, 0, 30, 0, 0, -1, 45, 0, 51, 10, -18, 0, 56, 0, 13, 0, -1, -3, 0, -13, 19, 0, 96, -1, -8, 0, 57, 0, 0, 0, 70, 9, 0, 0, 60, 0, 80, 0, -6, -18, -1, -1, -2, 0, -11, -1, 131
Offset: 1

Views

Author

Antti Karttunen, Jun 04 2021

Keywords

Crossrefs

Cf. A011772, A344876, A344878, A344977 (positions of negative terms), A344978, A344979 (positions of zeros), A344885 (and their characteristic function).

Programs

  • Mathematica
    A011772[n_] := Module[{m = 1}, While[Not[IntegerQ[m(m+1)/(2n)]], m++]; m];
    A344878[n_] := If[n == 1, 1, Module[{p, e}, LCM @@ Table[{p, e} = pe; (p^(e + If[p == 2, 1, 0])) - 1, {pe, FactorInteger[n]}]]];
    a[n_] := A344878[n] - A011772[n];
    Array[a, 100] (* Jean-François Alcover, Jun 12 2021 *)
  • PARI
    A011772(n) = { if(n==1, return(1)); my(f=factor(if(n%2, n, 2*n)), step=vecmax(vector(#f~, i, f[i, 1]^f[i, 2]))); forstep(m=step, 2*n, step, if(m*(m-1)/2%n==0, return(m-1)); if(m*(m+1)/2%n==0, return(m))); }; \\ From A011772
    A344878(n) = if(1==n,n, my(f=factor(n)~); lcm(vector(#f, i, (f[1, i]^(f[2, i]+(2==f[1, i]))-1))));
    A344976(n) = (A344878(n)-A011772(n));

Formula

a(n) = A344878(n) - A011772(n).
a(n) <= A344876(n).

A344972 a(n) = floor(A344875(n) / A011772(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 04 2021

Keywords

Crossrefs

Programs

  • PARI
    A011772(n) = { if(n==1, return(1)); my(f=factor(if(n%2, n, 2*n)), step=vecmax(vector(#f~, i, f[i, 1]^f[i, 2]))); forstep(m=step, 2*n, step, if(m*(m-1)/2%n==0, return(m-1)); if(m*(m+1)/2%n==0, return(m))); }; \\ From A011772
    A344875(n) = { my(f=factor(n)~); prod(i=1, #f, (f[1, i]^(f[2, i]+(2==f[1, i]))-1)); };
    A344972(n) = floor(A344875(n)/A011772(n));

Formula

a(n) = (A344875(n)-A344973(n)) / A011772(n) = floor(A344875(n) / A011772(n)).
a(n) = floor(A344971(n) / A344970(n)). - Antti Karttunen, Jun 20 2021

A344874 a(n) = A047994(n) - A011772(n).

Original entry on oeis.org

0, -2, 0, -4, 0, -1, 0, -8, 0, 0, 0, -2, 0, -1, 3, -16, 0, 0, 0, -3, 6, -1, 0, -1, 0, 0, 0, 11, 0, -7, 0, -32, 9, 0, 10, 16, 0, -1, 12, 13, 0, -8, 0, -2, 23, -1, 0, -2, 0, 0, 15, -3, 0, -1, 30, -6, 18, 0, 0, 9, 0, -1, 21, -64, 23, 9, 0, 32, 21, 4, 0, -7, 0, 0, 24, -2, 39, 12, 0, -4, 0, 0, 0, -12, 30, -1, 27, 38, 0, -3, 59
Offset: 1

Views

Author

Antti Karttunen, Jun 03 2021

Keywords

Crossrefs

Programs

  • PARI
    A011772(n) = { if(n==1, return(1)); my(f=factor(if(n%2, n, 2*n)), step=vecmax(vector(#f~, i, f[i, 1]^f[i, 2]))); forstep(m=step, 2*n, step, if(m*(m-1)/2%n==0, return(m-1)); if(m*(m+1)/2%n==0, return(m))); }; \\ From A011772
    A047994(n) = { my(f=factor(n)~); prod(i=1, #f, f[1, i]^f[2, i]-1); };
    A344874(n) = (A047994(n)-A011772(n));
Showing 1-6 of 6 results.