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: Ctibor O. Zizka

Ctibor O. Zizka's wiki page.

Ctibor O. Zizka has authored 448 sequences. Here are the ten most recent ones:

A387123 Numbers k such that Sum_{i=1..r} (k-i) and Sum_{i=1..r} (k+i) are both triangular for some r with 1 <= r < k.

Original entry on oeis.org

2, 6, 9, 21, 24, 38, 50, 53, 65, 77, 90, 96, 104, 133, 147, 195, 201, 224, 247, 286, 324, 377, 450, 483, 553, 588, 605, 614, 713, 792, 901, 1014, 1029, 1043, 1066, 1074, 1155, 1274, 1349, 1575, 1784, 1885, 1920, 2034, 2057, 2109, 2279, 2312, 2342, 2622
Offset: 1

Author

Ctibor O. Zizka, Aug 17 2025

Keywords

Comments

For m >= 1, if k = m*(m+1)^2/2 then r = m, thus A006002 is a subsequence. For k >= 286 from A101265 or A101879, r = k-1.

Examples

			For k = 6: the least r = 5, T_i = 1 + 2 + 3 + 4 + 5 = 15, T_j = 7 + 8 + 9 + 10 + 11 = 45, both T_i and T_j are triangular numbers, thus k = 6 is a term.
		

Crossrefs

Programs

  • Mathematica
    triQ[n_] := IntegerQ[Sqrt[8*n + 1]]; q[k_] := Module[{r = 1, s1 = 0, s2 = 0}, While[s1 += k - r; s2 += k + r; r < k && (! triQ[s1] || ! triQ[s2]), r++]; 1 <= r < k]; Select[Range[3000], q] (* Amiram Eldar, Aug 17 2025 *)
  • PARI
    isok(k) = my(sm=0, sp=0); for (r=1, k-1, sm+=k-r; sp+=k+r; if (ispolygonal(sm, 3) && ispolygonal(sp, 3), return(r));); \\ Michel Marcus, Aug 17 2025
    
  • Python
    from itertools import count, islice
    from sympy.ntheory.primetest import is_square
    def A387123_gen(startvalue=1): # generator of terms >= startvalue
        for k in count(max(startvalue,1)):
            if any(is_square(((k*r<<1)-r*(r+1)<<2)+1) and is_square(((k*r<<1)+r*(r+1)<<2)+1) for r in range(1,k)):
                yield k
    A387123_list = list(islice(A387123_gen(),50)) # Chai Wah Wu, Aug 21 2025

A386971 Numbers k >= 1 such that w(k-r) + ... + w(k-1) = w(k+1) + ... + w(k+r) for some r >= 1 where w(i) is the binary weight of i (A000120).

Original entry on oeis.org

3, 4, 7, 8, 11, 12, 14, 15, 16, 17, 19, 20, 23, 24, 27, 28, 29, 31, 32, 34, 35, 36, 39, 40, 43, 44, 46, 47, 48, 49, 51, 52, 55, 56, 58, 59, 60, 63, 64, 67, 68, 69, 71, 72, 75, 76, 78, 79, 80, 81, 83, 84, 87, 88, 91, 92, 93, 95, 96, 98, 99, 100, 103, 104, 107
Offset: 1

Author

Ctibor O. Zizka, Aug 11 2025

Keywords

Comments

r = 1 for k from A047457, k = 8*x - 5 or k = 8*x - 4, x >= 1.
r = 2 for k = 32*x - 18, (2* 7th row of A097586) or k = 32*x - 15, (10th row of A097586), x >= 1.

Examples

			For k = 7: A000120(4) + A000120(5) + A000120(6) = A000120(8) + A000120(9) + A000120(10), thus 7 is a term.
		

Crossrefs

Programs

  • Mathematica
    q[k_] := Module[{s = 0, r = 1}, While[r < k && (r == 1 || s != 0), s += (DigitSum[k-r, 2] - DigitSum[k+r, 2]); r++]; 1 < r <= k && s ==0]; Select[Range[120], q] (* Amiram Eldar, Aug 12 2025 *)

A385905 Numbers k >= 1 such that digsum(k-r) + ... + digsum(k-1) = digsum(k+1) + ... + digsum(k+r) for some r >= 1 where digsum(i) is the digital sum of i (A007953).

Original entry on oeis.org

9, 10, 19, 20, 29, 30, 39, 40, 49, 50, 59, 60, 69, 70, 77, 79, 80, 85, 86, 89, 90, 91, 92, 99, 100, 107, 108, 109, 110, 113, 114, 119, 120, 122, 129, 130, 139, 140, 149, 150, 159, 160, 169, 170, 177, 179, 180, 185, 186, 189, 190, 191, 192, 197, 199, 200, 202
Offset: 1

Author

Ctibor O. Zizka, Aug 12 2025

Keywords

Comments

Empirical observation: k != A214678(n).

Examples

			For k = 9: the least r = 8, A007953(1) + ... + A007953(8) = A007953(10) + ... + A007953(17), thus k = 9 is a term.
		

Crossrefs

Programs

  • Mathematica
    q[k_] := Module[{s = 0, r = 1}, While[r < k && (r == 1 || s != 0), s += (DigitSum[k-r] - DigitSum[k+r]); r++];1 < r <= k && s ==0]; Select[Range[202], q] (* Amiram Eldar, Aug 12 2025 *)

A386987 For n >= 2, a(n) is the least r >= 1 such that T(n - r) + ... + T(n - 1) = T(n + 1) + ... + T(n + r) where T(i) is A010060(i).

Original entry on oeis.org

2, 1, 1, 2, 4, 3, 3, 4, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 4, 3, 3, 4, 2, 1, 1, 2, 4, 3, 3, 4, 2, 1, 1, 2, 4, 3, 3, 4, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 4, 3, 3, 4, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 4, 3, 3, 4, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 4, 3, 3
Offset: 2

Author

Ctibor O. Zizka, Aug 12 2025

Keywords

Comments

a(n) is from {1, 2, 3, 4}.

Examples

			For n = 6: T(6 - r) + ... + T(5) = T(7) + ... + T(6 + r) is true for the least r = 4  because A010060(2) + A010060(3) + A010060(4) + A010060(5) = A010060(7) + A010060(8) + A010060(9) + A010060(10), thus a(6) = 4.
		

Programs

  • Mathematica
    a[n_] := Module[{s = 0, r = 1}, While[r <= n && (r == 1 || s != 0), s += (ThueMorse[n - r] - ThueMorse[n + r]); r++]; r-1]; Array[a, 100, 2] (* Amiram Eldar, Aug 12 2025 *)

Formula

a(A081706(n) + 1) = 1.
a(2*A079523(n)) = 2.
a(A249034(n))= 2.
a(A225822(n)) = 3.
a(A056196(n)) = 3.
a(2*A131323(n)) = 4.
a(2*A249034(n) - 1) = 4.

A386743 For n >= 0, a(n) is the least Fibonacci number F(i) such that F(i) = (2*n + 1)*(n + k) for some k >= 0.

Original entry on oeis.org

0, 3, 55, 21, 144, 55, 377, 6765, 2584, 2584, 987, 46368, 75025, 14930352, 317811, 832040, 6765, 102334155, 4181, 317811, 6765, 701408733, 1548008755920, 2178309, 225851433717, 14930352, 196418, 6765, 14930352, 591286729879, 832040, 46368, 9227465, 72723460248141, 46368
Offset: 0

Author

Ctibor O. Zizka, Aug 01 2025

Keywords

Comments

a(n) >= n*(2*n + 1).
Empirical observation: For F(i), i is from {1/3, 1/2, 2/3, 1, 3/2, 2}*A001177(2*n + 1).

Examples

			For n = 3: F(i) = 21 + 7*k is true for k = 0, F(8) = 21, thus a(3) = 21.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Module[{i=0},While[!Divisible[Fibonacci[i],2n+1] || Fibonacci[i]/(2n+1) < n, i++]; Fibonacci[i]]; Array[a,35,0] (* Stefano Spezia, Aug 04 2025 *)
  • PARI
    a(n) = my(i=0, f=fibonacci(0)); while((f % (2*n+1)) || (f/(2*n+1) < n), i++; f=fibonacci(i)); f; \\ Michel Marcus, Aug 01 2025
    
  • Python
    def A386743(n):
        a, b, m, k = 0, 1, n*((n<<1)|1), (n<<1)|1
        while aChai Wah Wu, Aug 11 2025

Extensions

More terms from Michel Marcus, Aug 01 2025

A385655 Numbers k >= 0 such that k = digsum(k) + digsum(k+1) + ... + digsum(k+r) for some r >= 0 where digsum(i) is the digital sum of i (A007953).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 17, 19, 20, 22, 28, 29, 34, 37, 38, 46, 47, 51, 56, 65, 70, 79, 88, 91, 94, 95, 103, 105, 106, 112, 114, 118, 121, 123, 130, 132, 137, 141, 150, 157, 166, 175, 178, 184, 192, 200, 203, 205, 220, 222, 235, 241, 246, 260
Offset: 1

Author

Ctibor O. Zizka, Aug 03 2025

Keywords

Examples

			For k = 10: 10 = A007953(10) + A007953(11) + A007953(12) + A007953(13) = 10, thus 10 is a term.
		

Crossrefs

Cf. A007953.

Programs

  • Mathematica
    q[k_] := Module[{s = 0, m = k}, While[s < k, s += DigitSum[m]; m++]; s == k]; Select[Range[0, 300], q] (* Amiram Eldar, Aug 03 2025 *)
  • PARI
    isok(k) = my(s=sumdigits(k), t=k+1); while (s < k, s+=sumdigits(t); t++); s==k; \\ Michel Marcus, Aug 04 2025
    
  • Python
    from itertools import count, islice
    def A385655_gen(startvalue=0): # generator of terms >= startvalue
        for k in count(max(startvalue,0)):
            s, r = 0, k
            while sA385655_list = list(islice(A385655_gen(),40)) # Chai Wah Wu, Aug 09 2025

A386277 For n >= 0, a(n) is the least Fibonacci number F_i (A000045) such that for some k >= 0, F_i = (n + 1)*(n + 2*k)/2, or a(n) = -1 if no such k exists.

Original entry on oeis.org

0, 1, 3, 34, 55, 21, 21, -1, 144, 55, 55, -1, 377, 987, 6765, 2584, 2584, -1, 2584, 610, 987, 6765, 46368, -1, 75025, 377, 14930352, -1, 317811, 6765, 832040, 14930352, 6765, -1, 102334155, -1, 4181, -1, 317811, -1, 6765, 987, 701408733, -1, 1548008755920, -1, 2178309, -1, 225851433717
Offset: 0

Author

Ctibor O. Zizka, Jul 17 2025

Keywords

Comments

n even: F_i exists for all even n. Proof: For n even we have (n*(n + 1)/2) mod (n + 1) = 0. The residue 0 is among the residues of the Pisano period of (Fibonacci sequence mod (n + 1)) for all n.
n odd: F_i exists only if the residue (n*(n + 1)/2) mod (n + 1) = (n + 1)/2 is among the residues of the Pisano period of (Fibonacci sequence mod (n + 1)).
Computational result: it looks like a(2*A367420(n) - 1) = -1, checked for n from [1, 2000].
The lower bound for nonnegative a(n) is n*(n + 1)/2.
Empirical observation: for a(n) = F_i, i = t*A001177(n + 1), t is from {1/3, 1/2, 2/3, 1, 3/2, 2}.

Examples

			For n = 3: (3 + 1)*(3 + 2*k)/2 = 6 + 4*k is a Fibonacci number at first for k = 7. Thus a(3) = 34.
For n = 7: (7 + 1)*(7 + 2*k)/2 = 28 + 8*k. (Fib_i congruent to 4 mod 8) has no solution because the Fibonacci sequence modulo 8 has a period of 12: (1, 1, 2, 3, 5, 0, 5, 5, 2, 7, 1, 0), the residues are {0, 1, 2, 3, 5, 7} and 4 is not among them. Thus a(7) = -1.
For n = 11: (11 + 1)*(11 + 2*k)/2 = 66 + 12*k . (Fib_i congruent to 6 mod 12) has no solution because the Fibonacci sequence modulo 12 has a period of 24: (1, 1, 2, 3, 5, 8, 1, 9, 10, 7, 5, 0, 5, 5, 10, 3, 1, 4, 5, 9, 2, 11, 1, 0), the residues are {0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11} and 6 is not among them. Thus a(11) = -1.
		

Programs

  • PARI
    isfib(n) = my(k=n^2); k+=(k+1)<<2; issquare(k) || (n>0 && issquare(k-8));
    row(n) = {my(L=List([0]), X=Mod([1, 1; 1, 0], n), I=Mod([1, 0; 0, 1], n), M=X); while(M<>I, M*=X; listput(L, lift(M[2, 2]))); Vec(L);} \\ A161553
    a(n) = my(p=(n + 1)*(n + 2*k)/2, x=polcoef(p, 1, 'k), y = polcoef(p, 0, 'k), v=row(x)); if (!vecsearch(Set(v),y % x), return(-1)); my(j=0); while ((denominator(jj=((2*fibonacci(j) - n*(n+1))/(2*(n+1)))) != 1) || (numerator(jj)<0), j++); fibonacci(j); \\ Michel Marcus, Jul 19 2025

Extensions

Corrected and extended by Michel Marcus, Jul 19 2025

A386546 Numbers k >= 1 such that k = d(k) + d(k+1) + ... + d(k+r) for some r >= 0 where d(i) is the number of divisors of i (A000005).

Original entry on oeis.org

1, 2, 6, 9, 12, 18, 21, 26, 28, 31, 43, 49, 52, 54, 73, 79, 91, 93, 95, 99, 102, 109, 111, 121, 122, 133, 153, 159, 175, 179, 185, 193, 197, 211, 215, 227, 231, 239, 241, 243, 271, 279, 286, 291, 295, 299, 301, 305, 309, 311, 313, 318, 324, 329, 339, 345
Offset: 1

Author

Ctibor O. Zizka, Jul 25 2025

Keywords

Comments

r is from {0,0,1,2,2,3,4,5,5,6,8,9,9,13,13,13,16,15,15,...}.

Examples

			For k = 2: 2 = A000005(2) = 2, thus 2 is a term.
For k = 6: 6 = A000005(6) + A000005(7) = 4 + 2 = 6, thus 6 is a term.
		

Crossrefs

Cf. A000005.

Programs

  • Mathematica
    q[k_] := Module[{s = 0, m = k}, While[s < k, s += DivisorSigma[0, m]; m++]; s == k]; Select[Range[350], q] (* Amiram Eldar, Jul 25 2025 *)

A385738 For n >= 1, a(n) is the least k such that the Sum_{i=0..(n-1)} (k+i)/A000005(k+i) is an integer or a(n) = -1 if no such k exists.

Original entry on oeis.org

1, 1, 6, 6, 8, 5, 6, 23, 5, 22, 50, 26, 28, 65, 119, 145, 26, 349, 282, 375, 280, 404, 278, 369, 279, 370, 277, 276, 369, 378, 389, 378, 389, 15, 389, 13, 12, 210, 10, 9, 8, 210, 6, 212, 421, 209, 419, 3, 2, 1, 378, 419, 421, 418, 418, 1026, 373, 105, 104
Offset: 1

Author

Ctibor O. Zizka, Jul 08 2025

Keywords

Examples

			For n = 4: Sum_{i=0..3} (k+i)/A000005(k+i) is an integer for the least k = 6 because 6/A000005(6) + 7/A000005(7) + 8/A000005(8) + 9/A000005(9) = 10.
		

Crossrefs

Cf. A000005.

Programs

A385720 Numbers k >= 1 such that k/A000005(k) + (k+1)/A000005(k+1) is an integer.

Original entry on oeis.org

1, 5, 6, 8, 10, 13, 22, 37, 45, 46, 58, 61, 62, 69, 73, 74, 77, 82, 89, 106, 114, 117, 126, 146, 149, 150, 154, 157, 166, 167, 178, 186, 193, 197, 198, 206, 221, 226, 233, 237, 258, 261, 262, 263, 266, 277, 278, 279, 280, 290, 293, 306, 309, 311, 312, 313
Offset: 1

Author

Ctibor O. Zizka, Jul 07 2025

Keywords

Comments

k/A000005(k) + (k+1)/A000005(k+1) = (3*k + 1)/4 for k >= 5 from A256072.
k/A000005(k) + (k+1)/A000005(k+1) = (3*k + 2)/4 for k >= 6 from A077065.
k/A000005(k) + (k+1)/A000005(k+1) =< (3*k + 2)/4 for k >= 5.

Examples

			For k = 6: 6/A000005(6) + 7/A000005(7) = 6/4 + 7/2 = 5, thus k = 6 is a term.
		

Crossrefs

Programs

  • Mathematica
    Position[Plus @@@ Partition[Table[n/DivisorSigma[0, n], {n, 1, 320}], 2, 1], ?IntegerQ] // Flatten (* _Amiram Eldar, Jul 08 2025 *)
  • PARI
    isok(k) = denominator(k/numdiv(k) + (k+1)/numdiv(k+1)) == 1; \\ Michel Marcus, Jul 08 2025
    
  • Python
    from itertools import count, islice
    from sympy import divisor_count
    def A385720_gen(startvalue=1): # generator of terms >= startvalue
        m = max(startvalue,1)
        a, b = divisor_count(m), divisor_count(m+1)
        for k in count(m):
            if not (k*b+(k+1)*a)%(a*b):
                yield k
            a, b = b, divisor_count(k+2)
    A385720_list = list(islice(A385720_gen(),30)) # Chai Wah Wu, Jul 13 2025