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: ] = T[

] = T['s wiki page.

] = T[ has authored 3028 sequences. Here are the ten most recent ones:

A381233 Concatenate the sequences S(k) = [0, 1, -1, ..., k, -k] for k = 0, 1, ...

Original entry on oeis.org

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

Author

N. J. A. Sloane, Mar 01 2025 [Suggested by Franklin T. Adams-Watters, Sep 21 2011]

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten[Table[(-1)^j*Floor[j/2], {k, 0, 10}, {j, 2*k + 1}]] (* Paolo Xausa, Mar 01 2025 *)

A381232 Count down from k to -k for k = 0, 1, 2, ... .

Original entry on oeis.org

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

Author

N. J. A. Sloane, Mar 01 2025 [Suggested by Franklin T. Adams-Watters, Sep 21 2011]

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Range[k, -k, -1], {k, 0, 10}]] (* Paolo Xausa, Mar 01 2025 *)
  • Python
    from math import isqrt
    def A381232(n): return (t:=isqrt(n))*(t+1)-n # Chai Wah Wu, Mar 01 2025

Formula

a(n) = -A196199(n) = floor(sqrt(n))*(floor(sqrt(n))+1)-n. - Chai Wah Wu, Mar 01 2025

A381104 a(n) is the number of prime factors with exponent 1 in the prime factorization of the n-th superabundant number.

Original entry on oeis.org

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

Author

Agustin T. Besteiro, Feb 14 2025

Keywords

Comments

Alaoglu and Erdős proved that for all superabundant numbers, the exponents in their prime factorization are non-increasing. Moreover, there is always a sequence of prime factors with exponent 1 at the end of the factorization. The only exceptions for this sequence are 1, 4 and 36.

Examples

			For n=8 the 8th superabundant number is 48 = 2^4*3^1. Only one prime factor appears with exponent 1 so a(8) = 1.
		

Crossrefs

Formula

a(n) = A056169(A004394(n)).

A365144 Numbers having each digit once and whose 4th power has each digit four times.

Original entry on oeis.org

5702631489, 7264103985, 7602314895, 7824061395, 8105793624, 8174035962, 8304269175, 8904623175, 8923670541, 9451360827, 9785261403, 9804753612, 9846032571
Offset: 1

Author

T. D. Noe, Nov 09 2011

Keywords

Comments

Currently same terms as A114260, but that sequence has more terms to follow. - Ray Chandler, Aug 23 2023

Examples

			5702631489 is a term since its 4th power 1057550783692741389295697108242363408641 contains four 5's, four 7's, four 0's and so on.
		

Crossrefs

Cf. A050278 (pandigital numbers), A199630, A199631, A199633. Subsequence of A114260.

Programs

  • Mathematica
    t = Select[Permutations[Range[0, 9]], #[[1]] > 0 &]; t2 = Select[t, Union[DigitCount[FromDigits[#]^4]] == {4} &]; FromDigits /@ t2 (* T. D. Noe, Nov 08 2011 *)

A363256 Number of length n strings on the alphabet {0,1,2,3} with digit sum at most 4.

Original entry on oeis.org

1, 4, 13, 32, 66, 121, 204, 323, 487, 706, 991, 1354, 1808, 2367, 3046, 3861, 4829, 5968, 7297, 8836, 10606, 12629, 14928, 17527, 20451, 23726, 27379, 31438, 35932, 40891, 46346, 52329, 58873, 66012, 73781, 82216, 91354, 101233, 111892, 123371, 135711
Offset: 0

Author

Daniel T. Martin, May 23 2023

Keywords

Examples

			For n=2, the 13 strings are all possible 2-character strings of '0', '1', '2' and '3' except the four strings '33', '32', '23'.
		

Crossrefs

Cf. A227259 (the same for {0,1,2} with digit sum <= 4).
Cf. A105163 (the same for {0,1,2} with digit sum <= 3, shifted by 2).
Cf. A005718.

Programs

  • Mathematica
    f[n_, r_, l_] := If[r < 0, 0, If[r==0, 1, If[l < 0, 0, If[l == 0, 1, Sum[f[n, r-j, l-1], {j, 0, n}]]]]]; Table[f[3, 4,x], {x, 0, 40}]

Formula

a(n) = (((n + 10)*n + 35)*n + 26)*n/24 + 1.
G.f.: -(x^4 - 3*x^3 + 3*x^2 - x + 1)/(x - 1)^5.
a(n) = 1 + A005718(n-1) for n>=1.

A361741 Starting positions of digit triples in the decimal expansion of Pi where the sum of the first 2 equals the third.

Original entry on oeis.org

1, 3, 10, 29, 61, 73, 83, 106, 117, 132, 177, 192, 195, 198, 241, 248, 251, 281, 309, 311, 333, 362, 381, 393, 432, 477, 486, 494, 504, 508, 525, 532, 536, 555, 602, 611, 628, 647, 662, 674, 689, 699, 710, 747, 755, 760, 771, 806, 853, 856, 887, 899, 927, 934, 966, 969, 989
Offset: 1

Author

Aaron T Cowan, Mar 22 2023

Keywords

Comments

The first digit of Pi, "3", is reckoned as position 1.
This pattern happens from the first digit of Pi, so it seems to be pretty basic.

Examples

			1 is the first term, since the first two digits 3 and 1 add up to 4.
3 is the second term, since 4 + 1 = 5.
10 is next, since 3 + 5 = 8.
		

Crossrefs

Programs

  • MATLAB
    p=char(vpa(pi,1000));p(2)='3';
    for i=2:strlength(p)-2
      if str2num(p(i))+str2num(p(i+1))==str2num(p(i+2)) fprintf('%i,',i-1)  end
    end

Formula

Integers k such that A000796(k) + A000796(k+1) = A000796(k+2).
Equivalently, A110883(k) = A000796(k+2).
In a random model of this sequence (call it A(n)), A(n) ~ kn with probability 1, where k = 200/11. - Charles R Greathouse IV, Mar 28 2023

A360790 Squared length of diagonal of right trapezoid with three consecutive prime length sides.

Original entry on oeis.org

8, 13, 41, 53, 137, 173, 305, 397, 533, 877, 977, 1373, 1697, 1885, 2245, 2813, 3517, 3737, 4493, 5077, 5345, 6277, 6953, 7937, 9413, 10217, 10613, 11465, 12077, 12785, 16165, 17165, 18869, 19325, 22237, 22837, 24665, 26605, 27925, 29933, 32141, 32765, 36497, 37253, 38953, 39745
Offset: 1

Author

Aaron T Cowan, Feb 20 2023

Keywords

Comments

The value d is the square of the length of the diagonal of a trapezoid with a height and bases that are consecutive primes, respectively. The diagonal length is calculated using the Pythagorean theorem, but this distance is squared so that the value is an integer.

Examples

			        p(2)=3
        _ _ _ _
a(1):  |        \  d^2=2^2+(5-3)^2=8
p(1)=2 |_ _ _ _ _\
        p(3)=5
        p(3)=5
        _ _ _ _ _ _
a(2):  |           \    d^2=3^2 + (7-5)^2 = 9+4 = 13
p(2)=3 |            \
       |_ _ _ _ _ _ _\
        p(4)=7
a(3)= 5^2+(11-7)^2 = 25+16 = 41
a(7)= 17^2+(23-19)^2=305 = 5*61
		

Crossrefs

Programs

  • MATLAB
    %shorter 1 line version
    arrayfun(@(p) p^2+(nextprime(nextprime(p+1)+1)-nextprime(p+1))^2,[primes(10^6)])
    
  • Mathematica
    Map[(#[[1]]^2 + (#[[3]] - #[[2]])^2) &, Partition[Prime[Range[50]], 3, 1]] (* Amiram Eldar, Feb 24 2023 *)
  • PARI
    a(n) = prime(n)^2 + (prime(n+2)-prime(n+1))^2; \\ Michel Marcus, Feb 23 2023

Formula

a(n) = prime(n)^2 + (prime(n+2)-prime(n+1))^2.
a(n) = A001248(n) + A076821(n+1). - Michel Marcus, Feb 23 2023

A356718 T(n,k) is the total number of prime factors, counted with multiplicity, of k!*(n-k)!, for 0 <= k <= n. Triangle read by rows.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 2, 1, 1, 2, 4, 2, 2, 2, 4, 5, 4, 3, 3, 4, 5, 7, 5, 5, 4, 5, 5, 7, 8, 7, 6, 6, 6, 6, 7, 8, 11, 8, 8, 7, 8, 7, 8, 8, 11, 13, 11, 9, 9, 9, 9, 9, 9, 11, 13, 15, 13, 12, 10, 11, 10, 11, 10, 12, 13, 15, 16, 15, 14, 13, 12, 12, 12
Offset: 0

Author

Dario T. de Castro, Aug 24 2022

Keywords

Comments

k!*(n-k)! is the denominator in binomial(n,k) = n!/(k!*(n-k)!) and all prime factors in the denominator cancel to leave an integer, so that T(n,k) = A022559(n) - A132896(n,k).

Examples

			Triangle begins:
  n\k| 0  1  2  3  4  5  6  7
  ---+--------------------------------------
   0 | 0
   1 | 0, 0;
   2 | 1, 0, 1;
   3 | 2, 1, 1, 2;
   4 | 4, 2, 2, 2, 4;
   5 | 5, 4, 3, 3, 4, 5;
		

Crossrefs

Programs

  • Mathematica
    T[n_,k_]:=PrimeOmega[Factorial[k]*Factorial[n-k]];
    tab=Flatten[Table[T[n,k],{n,0,10},{k,0,n}]]

Formula

T(n,k) = bigomega(k!*(n-k)!), where 0 <= k <= n.
T(n,0) = T(n,n) = A022559(n).

A354139 a(n) is the least positive integer m such that (k+1)^n + (k+2)^n + ... + (k+m)^n == 0 (mod n) for every positive integer k.

Original entry on oeis.org

1, 4, 3, 8, 5, 36, 7, 16, 3, 20, 11, 72, 13, 28, 15, 32, 17, 108, 19, 200, 21, 44, 23, 144, 5, 52, 3, 56, 29, 180, 31, 64, 33, 68, 35, 216, 37, 76, 39, 400, 41, 1764, 43, 88, 15, 92, 47, 288, 7, 20, 51, 104, 53, 324, 55, 112, 57, 116, 59, 1800, 61, 124, 21, 128, 65, 396, 67, 136, 69, 140, 71
Offset: 1

Author

Dimitrios T. Tambakos, May 18 2022

Keywords

Comments

a(n) divides n * A007947(n).

Examples

			a(2) = 4 because, for every positive integer k, (k+1)^2 + (k+2)^2 + (k+3)^2 + (k+4)^2 == 0 (mod 2), and no smaller positive integer satisfies this condition.
		

Programs

  • Mathematica
    sum[n_, r_] := Mod[Sum[k^r, {k, 1, n}], r];
    rad[r_] := Product[i[[1]], {i, FactorInteger[r]}];
    seq[r_] := Table[sum[n, r], {n, 1, r*rad[r]}];
    A354139[r_] := Piecewise[   {    {rad[r], OddQ[r]},
        {2*r, EvenQ[r] && PrimePowerQ[r]},
        {Length[FindRepeat[seq[r]]], EvenQ[r] && Not[PrimePowerQ[r]]}
        }
       ];
    Table[A354139[r], {r, 1, 20}] (* Improved by Dimitrios T. Tambakos, Feb 08 2023 *)
  • PARI
    isok(k, n) = my(p=sum(i=1, k, Mod(i+x, n)^n)); if (p==0, return(1)); for (i=1, n, if (subst(p, x, i) != 0, return(0))); return(1);
    a(n) = my(k=1); while (!isok(k,n), k++); k; \\ Michel Marcus, May 21 2022

Formula

a(2^t) = 2^(t+1) for integers t>0.
a(n) = A007947(n) for odd integers n.
Conjecture: a(n) = A007947(n) * A193267(n).

A348776 The numbers >= 2 with 3 repeated.

Original entry on oeis.org

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

Author

N. J. A. Sloane, Nov 07 2021, following a suggestion from L. Guyot and T. Y. Lam

Keywords

Comments

This sequence, 2, 3, 3, 4, 5, 6, 7, ..., gives the stable range of the polynomial rings Z, Z[x_1], Z[x_1, x_2], Z[x_1, x_2, x_3], ...
A note on terminology: "stable range" and "stable rank" are the same thing. In the English-speaking world, people have always used the term "stable range", which was what Bass had invented in the early '60s. When Russian workers wrote on this theme, of course they used a Russian translation of the term "stable range". When the term was translated back into English, it became "stable rank"! - T. Y. Lam, Nov 07 2021

References

  • T. Y. Lam, Excursions in Ring Theory, in preparation, 2021. See Section 24.

Programs

Formula

a(n) = n for n >= 3.
From Chai Wah Wu, Aug 09 2022: (Start)
a(n) = 2*a(n-1) - a(n-2) for n > 4.
G.f.: x*(x^3 - x^2 - x + 2)/(x - 1)^2. (End)
E.g.f.: x*(2*(1 + exp(x)) + x)/2. - Stefano Spezia, Apr 25 2025