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.

User: Antti Karttunen,

Antti Karttunen,'s wiki page.

Antti Karttunen, has authored 11180 sequences. Here are the ten most recent ones:

A387408 Partial sums of A387412, where A387412(n) is the length of the maximal common prefix of the binary expansions of n and A003961(n).

Original entry on oeis.org

1, 2, 3, 6, 7, 9, 10, 11, 12, 16, 17, 18, 19, 20, 21, 23, 26, 31, 33, 34, 35, 37, 38, 39, 43, 46, 48, 50, 53, 55, 56, 57, 62, 63, 66, 67, 69, 72, 74, 77, 81, 85, 88, 89, 92, 95, 96, 100, 102, 103, 104, 105, 107, 108, 109, 110, 116, 117, 120, 121, 122, 124, 125, 127, 128, 129, 133, 135, 138, 139, 142, 144, 148, 149
Offset: 1

Author

Antti Karttunen, Sep 03 2025

Keywords

Crossrefs

Programs

  • PARI
    up_to = 65537;
    A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    A387412(n) = { my(a=binary(n), b=binary(A003961(n)), i=1); while(i<=#a,if(a[i]!=b[i],return(i-1)); i++); (#a); };
    A387408list(up_to) = { my(v=vector(up_to)); v[1] = A387412(1); for(n=2,up_to,v[n] = v[n-1]+A387412(n)); (v); };
    v387408 = A387408list(up_to);
    A387408(n) = v387408[n];

Formula

a(1) = 1; and for n > 1, a(n) = a(n-1) + A387412(n).
a(n) = A387407(n) - A387409(n).

A387407 Partial sums of A387422, where A387422 is the length of the maximal common prefix of the binary expansions of n and sigma(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 9, 10, 11, 13, 14, 16, 18, 20, 22, 23, 26, 30, 32, 36, 38, 40, 41, 43, 45, 46, 47, 52, 55, 56, 57, 58, 59, 60, 61, 63, 67, 68, 69, 72, 76, 77, 80, 83, 85, 87, 88, 90, 92, 93, 94, 97, 101, 103, 104, 107, 108, 109, 112, 113, 117, 119, 121, 122, 124, 127, 131, 132, 133, 136, 139, 140, 145, 146, 147
Offset: 1

Author

Antti Karttunen, Sep 03 2025

Keywords

Crossrefs

Programs

  • PARI
    up_to = 65537;
    A387422(n) = { my(a=binary(n), b=binary(sigma(n)), i=1); while(i<=#a,if(a[i]!=b[i],return(i-1)); i++); (#a); };
    A387407list(up_to) = { my(v=vector(up_to)); v[1] = A387422(1); for(n=2,up_to,v[n] = v[n-1]+A387422(n)); (v); };
    v387407 = A387407list(up_to);
    A387407(n) = v387407[n];

Formula

a(1) = 1; and for n > 1, a(n) = a(n-1) + A387422(n).
a(n) = A387408(n) + A387409(n).

A387409 Partial sums of A387422 minus partial sums of A387412.

Original entry on oeis.org

0, 0, 0, -2, -2, -1, -1, -1, -1, -3, -3, -2, -1, 0, 1, 0, 0, -1, -1, 2, 3, 3, 3, 4, 2, 0, -1, 2, 2, 1, 1, 1, -3, -3, -5, -4, -2, -4, -5, -5, -5, -8, -8, -6, -7, -8, -8, -10, -10, -10, -10, -8, -6, -5, -5, -3, -8, -8, -8, -8, -5, -5, -4, -5, -4, -2, -2, -3, -5, -3, -3, -4, -3, -3, -3, -1, -3, -2, -2, -1, -2, -3, -2
Offset: 1

Author

Antti Karttunen, Sep 03 2025

Keywords

Comments

Also partial sums of A387413 minus partial sums of A387423.
This sequence gives some measure of how much longer the common prefix of the binary expansions of n and sigma(n) is - on average - than the common prefix of the binary expansions of n and A003961(n).
Question: Does the sequence eventually grow without limit and is it just because A003961(n) >= A000203(n)? Does ratio a(n)/n converge to any limit?

Programs

Formula

a(n) = A387407(n) - A387408(n).
a(n) = A387425(n) - A387424(n).

A387425 Partial sums of A387413.

Original entry on oeis.org

0, 1, 2, 2, 4, 5, 7, 10, 13, 13, 16, 19, 22, 25, 28, 31, 33, 33, 36, 40, 44, 47, 51, 55, 56, 58, 61, 64, 66, 69, 73, 78, 79, 84, 87, 92, 96, 99, 103, 106, 108, 110, 113, 118, 121, 124, 129, 131, 135, 140, 145, 150, 154, 159, 164, 169, 169, 174, 177, 182, 187, 191, 196, 201, 207, 213, 216, 221, 225, 231, 235, 240, 243
Offset: 1

Author

Antti Karttunen, Sep 01 2025

Keywords

Crossrefs

Cf. also A387424.

Programs

  • PARI
    up_to = 65537;
    A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    A387413(n) = { my(a=binary(n), b=binary(A003961(n)), i=1); while(i<=#a,if(a[i]!=b[i],return(#a-(i-1))); i++); (0); };
    A387425list(up_to) = { my(v=vector(up_to)); v[1] = 0; for(n=2,up_to,v[n] = v[n-1]+A387413(n)); (v); };
    v387425 = A387425list(up_to);
    A387425(n) = v387425[n];

A387424 Partial sums of A387423.

Original entry on oeis.org

0, 1, 2, 4, 6, 6, 8, 11, 14, 16, 19, 21, 23, 25, 27, 31, 33, 34, 37, 38, 41, 44, 48, 51, 54, 58, 62, 62, 64, 68, 72, 77, 82, 87, 92, 96, 98, 103, 108, 111, 113, 118, 121, 124, 128, 132, 137, 141, 145, 150, 155, 158, 160, 164, 169, 172, 177, 182, 185, 190, 192, 196, 200, 206, 211, 215, 218, 224, 230, 234, 238, 244
Offset: 1

Author

Antti Karttunen, Sep 01 2025

Keywords

Crossrefs

Cf. also A387425.

Programs

  • Mathematica
    A387423[n_] := BitLength[n] - LengthWhile[Transpose[IntegerDigits[{n, DivisorSigma[1, n]}, 2][[All, ;; BitLength[n]]]], Equal @@ # &];
    Accumulate[Array[A387423, 100]] (* Paolo Xausa, Sep 03 2025 *)
  • PARI
    up_to = 65537;
    A387423(n) = { my(a=binary(n), b=binary(sigma(n)), i=1); while(i<=#a,if(a[i]!=b[i],return(#a-(i-1))); i++); (0); };
    A387424list(up_to) = { my(v=vector(up_to)); v[1] = 0; for(n=2,up_to,v[n] = v[n-1]+A387423(n)); (v); };
    v387424 = A387424list(up_to);
    A387424(n) = v387424[n];

Formula

a(1) = 0; for n > 1, a(n) = a(n-1) + A387423(n).

A387422 The length of the maximal common prefix of the binary expansions of n and sigma(n), where sigma is the sum of divisors function.

Original entry on oeis.org

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

Author

Antti Karttunen, Sep 01 2025

Keywords

Crossrefs

Programs

  • Mathematica
    A387422[n_] := LengthWhile[Transpose[IntegerDigits[{n, DivisorSigma[1, n]}, 2][[All, ;; BitLength[n]]]], Equal @@ # &];
    Array[A387422, 100] (* Paolo Xausa, Sep 03 2025 *)
  • PARI
    A387422(n) = { my(a=binary(n), b=binary(sigma(n)), i=1); while(i<=#a,if(a[i]!=b[i],return(i-1)); i++); (#a); };
    
  • Python
    from os.path import commonprefix
    from sympy import divisor_sigma
    def A387422(n): return len(commonprefix([bin(n)[2:],bin(divisor_sigma(n))[2:]])) # Chai Wah Wu, Sep 03 2025

Formula

a(n) = (1+A000523(n)) - A387423(n).

A387413 The length of binary expansion of n minus the length of the maximal common prefix of the binary expansions of n and A003961(n), where A003961 is fully multiplicative with a(p) = nextprime(p).

Original entry on oeis.org

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

Author

Antti Karttunen, Sep 01 2025

Keywords

Crossrefs

Cf. A000523, A003961, A387412, A387414 (positions of 0's).
Cf. also A387423.

Programs

  • PARI
    A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    A387413(n) = { my(a=binary(n), b=binary(A003961(n)), i=1); while(i<=#a,if(a[i]!=b[i],return(#a-(i-1))); i++); (0); };

Formula

a(n) = (1+A000523(n)) - A387412(n).

A387412 The length of the maximal common prefix of the binary expansions of n and A003961(n), where A003961 is fully multiplicative with a(p) = nextprime(p).

Original entry on oeis.org

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

Author

Antti Karttunen, Sep 01 2025

Keywords

Crossrefs

Cf. also A387422.

Programs

  • PARI
    A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    A387412(n) = { my(a=binary(n), b=binary(A003961(n)), i=1); while(i<=#a,if(a[i]!=b[i],return(i-1)); i++); (#a); };
    
  • Python
    from os.path import commonprefix
    from math import prod
    from sympy import factorint, nextprime
    def A387412(n): return len(commonprefix([bin(n)[2:],bin(prod(nextprime(p)**e for p, e in factorint(n).items()))[2:]])) # Chai Wah Wu, Sep 03 2025

Formula

a(n) = (1+A000523(n)) - A387413(n).

A387423 The length of binary expansion of n minus the length of the maximal common prefix of the binary expansions of n and sigma(n), where sigma is the sum of divisors function.

Original entry on oeis.org

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

Author

Antti Karttunen, Sep 01 2025

Keywords

Comments

Positions of 0's in this sequence is given by such numbers n that sigma(n) = 2^k * n + r, for some n >= 1, k >= 0, 0 <= r < 2^k. These would include also quasi-perfect numbers and their generalizations, numbers n such that sigma(n) = 2^k * n + 2^k - 1, for some n > 1, k > 0 (see comments in A332223), if such numbers exist. However, it is conjectured that there are no other zeros than those given by A336702.

Crossrefs

Cf. A000203, A000523, A332223, A336700, A336701, A336702 (conjectured positions of 0's), A387422.
Cf. also A347381, A387413.

Programs

  • Mathematica
    A387423[n_] := BitLength[n] - LengthWhile[Transpose[IntegerDigits[{n, DivisorSigma[1, n]}, 2][[All, ;; BitLength[n]]]], Equal @@ # &];
    Array[A387423, 100] (* Paolo Xausa, Sep 03 2025 *)
  • PARI
    A387423(n) = { my(a=binary(n), b=binary(sigma(n)), i=1); while(i<=#a,if(a[i]!=b[i],return(#a-(i-1))); i++); (0); };
    
  • Python
    from os.path import commonprefix
    from sympy import divisor_sigma
    def A387423(n): return n.bit_length()-len(commonprefix([bin(n)[2:],bin(divisor_sigma(n))[2:]])) # Chai Wah Wu, Sep 03 2025

Formula

a(n) = (1+A000523(n)) - A387422(n).

A387414 Numbers k such that the binary expansion of k is a prefix of the binary expansion of A003961(k), where A003961 is fully multiplicative with a(p) = nextprime(p).

Original entry on oeis.org

1, 4, 10, 18, 57, 348, 1054, 2626, 60625, 68727, 129260, 192276, 675348, 960320, 5368464, 12371554, 30078308, 356311953, 1158654378, 1673018314
Offset: 1

Author

Antti Karttunen, Sep 01 2025

Keywords

Comments

Numbers k such that A003961(k) = 2^e * k + r, for some k >= 1, e >= 0, 0 <= r < 2^e.

Examples

			A007088(4) = 100, and A007088(A003961(4)) = A007088(9) = 1001 begins with the same binary string, therefore 4 is included.
A007088(18) = 10010, and A007088(A003961(18)) = A007088(75) = 1001011 begins with the same binary string, therefore 18 is included as a term. Also, 75 = 2^2 * 18 + 3.
		

Crossrefs

Positions of 0's in A387413.
Subsequences: A348514 (which is also a subsequence of A387411).

Programs

  • PARI
    A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    is_A387414(n) = { my(s=A003961(n)); while(s>n, s >>= 1); (s==n); };