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.

Previous Showing 11-20 of 22 results. Next

A127323 Third 4-dimensional hyper-tetrahedral coordinate; 4-D analog of A056557.

Original entry on oeis.org

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

Views

Author

Graeme McRae, Jan 10 2007

Keywords

Comments

If {(W,X,Y,Z)} are 4-tuples of nonnegative integers with W>=X>=Y>=Z ordered by W, X, Y and Z, then W=A127321(n), X=A127322(n), Y=A127323(n) and Z=A127324(n). These sequences are the four-dimensional analogs of the three-dimensional A056556, A056557 and A056558.

Examples

			a(23)=2 because a(A000332(2+3)+A000292(2)+A000217(2)) = a(A000332(2+3)+A000292(2)+A000217(2+1)-1) = 2, so a(22) = a(24) = 2.
See A127321 for a table of A127321, A127322, A127323, A127324.
		

Crossrefs

Formula

For W>=X>=0, a(A000332(W+3)+A000292(X)+A000217(Y)) = a(A000332(W+3)+A000292(X)+A000217(Y+1)-1) = Y A127322(n+1) = A127321(n)==A127324(n) ? 0 : A127322(n)==A127324(n) ? 0 : A127323(n)==A127324(n) ? A127323(n)+1 : A127323(n)

A331195 Three-column table read by rows: triples (i,j,k) in order sorted from the left.

Original entry on oeis.org

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

Views

Author

Mehmet A. Ates, Jun 08 2020

Keywords

Examples

			For n=[0,1,2] to n=[12,13,14], a[n,n+1,n+2] counts up as such: [0,0,0], [1,0,0], [1,1,0], [1,1,1], [2,0,0], etc.
		

Crossrefs

See A372667 for the norms of these triples.

Programs

  • Mathematica
    ThreeDVectors = List[];
    SeqSize = 10;
    For[i = 0, i <= SeqSize, i++,
      For[j = 0, j <= i, j++,
        For[k = 0, k <= j, k++,
          AppendTo[ThreeDVectors, {i, j, k}]
        ]
      ]
    ];
    Flatten[ThreeDVectors]
  • Python
    from math import comb, isqrt
    from sympy import integer_nthroot
    def A331195(n): return (m:=integer_nthroot((n<<1)+6,3)[0])-(n<3*comb(m+2,3)) if not (a:=n%3) else (k:=isqrt(r:=(b:=n//3)+1-comb((m:=integer_nthroot((n<<1)-1,3)[0])-(b=comb(m+2,3))+1,3))-comb((k:=isqrt(m:=r+1<<1))+(m>k*(k+1)),2) # Chai Wah Wu, Nov 23 2024

Formula

a(3*n) = A056556(n).
a(3*n+1) = A056557(n).
a(3*n+2) = A056558(n).

A360010 First part of the n-th weakly decreasing triple of positive integers sorted lexicographically. Each n > 0 is repeated A000217(n) times.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Feb 11 2023

Keywords

Examples

			Triples begin: (1,1,1), (2,1,1), (2,2,1), (2,2,2), (3,1,1), (3,2,1), (3,2,2), (3,3,1), (3,3,2), (3,3,3), ...
		

Crossrefs

For pairs instead of triples we have A002024.
Positions of first appearances are A050407(n+2) = A000292(n)+1.
The zero-based version is A056556.
The triples have sums A070770.
The second instead of first part is A194848.
The third instead of first part is A333516.
Concatenating all the triples gives A360240.

Programs

  • Mathematica
    nn=9;First/@Select[Tuples[Range[nn],3],GreaterEqual@@#&]
  • Python
    from math import comb
    from sympy import integer_nthroot
    def A360010(n): return (m:=integer_nthroot(6*n,3)[0])+(n>comb(m+2,3)) # Chai Wah Wu, Nov 04 2024

Formula

a(n) = A056556(n) + 1 = A331195(3n) + 1.
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/8 + log(2)/4. - Amiram Eldar, Feb 18 2024
a(n) = m+1 if n>binomial(m+2,3) and a(n) = m otherwise where m = floor((6n)^(1/3)). - Chai Wah Wu, Nov 04 2024

A070770 b + c + d where b >= c >= d >= 0 ordered by b then c then d.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, May 06 2002

Keywords

Examples

			Triangle begins:
  0,
  ;
  1;
  2, 3;
  ;
  2;
  3, 4;
  4, 5, 6;
  ;
  3;
  4, 5,
  5, 6, 7;
  6, 7, 8, 9;
  ;
  4;
  5, 6;
  6, 7,  8;
  7, 8,  9, 10;
  8, 9, 10, 11, 12;
  ;
  ...
		

Crossrefs

Cf. A001477, A051162, A070771, A070772 for similar sequences with different numbers of terms summed.

Programs

  • Maple
    seq(seq(seq(b+c+d,d=0..c),c=0..b),b=0..10); # Robert Israel, Jun 21 2018
  • PARI
    for(x=0,5,for(y=0,x,for(z=0,y,print1(x+y+z", ")))) \\ Charles R Greathouse IV, Sep 17 2015
    
  • Python
    from math import isqrt, comb
    from sympy import integer_nthroot
    def A070770(n): return (m:=integer_nthroot(6*(n+1),3)[0])+(a:=n>=comb(m+2,3))+(k:=isqrt(b:=(c:=n+1-comb(m+a+1,3))<<1))-((b<<2)<=(k<<2)*(k+1)+1)+c-2-comb(k+(b>k*(k+1)),2) # Chai Wah Wu, Dec 11 2024

Formula

a(n) = A056556(n) + A056557(n) + A056558(n).

A357773 Odd numbers with two zeros in their binary expansion.

Original entry on oeis.org

9, 19, 21, 25, 39, 43, 45, 51, 53, 57, 79, 87, 91, 93, 103, 107, 109, 115, 117, 121, 159, 175, 183, 187, 189, 207, 215, 219, 221, 231, 235, 237, 243, 245, 249, 319, 351, 367, 375, 379, 381, 415, 431, 439, 443, 445, 463, 471, 475, 477, 487, 491, 493, 499, 501
Offset: 1

Views

Author

Bernard Schott, Oct 12 2022

Keywords

Comments

A048490 \ {1} is a subsequence, since for m >= 1, A048490(m) = 8*2^m - 7 has 11..11001 with m starting 1 for binary expansion.
A153894 \ {4} is a subsequence, since for m >= 1, A153894(m) = 5*2^m - 1 has 10011..11 with m trailing 1 for binary expansion.
A220236 is a subsequence, since for m >= 1, A220236(m) = 2^(2*m + 2) - 2^(m + 1) - 2^m - 1 has 11..110011..11 with m starting 1 and m trailing 1 for binary expansion.
For k > 2, there are (k-1)*(k-2)/2 terms between 2^k and 2^(k+1), or equivalently (k-1)*(k-2)/2 terms with k+1 bits.
Binary expansion of a(n) is A357774(n).
{4*a(n), n>0} form a subsequence of A353654 (numbers with two trailing 0 bits and two other 0 bits).

Crossrefs

Odd numbers with k zeros in their binary expansion: A000225 (k=0), A190620 (k=1).
Subsequences: A048490 \ {1}, A153894 \ {4}, A220236.

Programs

  • Maple
    seq(seq(seq(2^n-1-2^i-2^j,j=i-1..1,-1),i=n-2..1,-1),n=4..10); # Robert Israel, Oct 13 2022
  • Mathematica
    Select[Range[1, 500, 2], DigitCount[#, 2, 0] == 2 &] (* Amiram Eldar, Oct 12 2022 *)
  • PARI
    isok(k) = (k%2) && (#binary(k) == hammingweight(k)+2); \\ Michel Marcus, Oct 13 2022
    
  • PARI
    list(lim)=my(v=List()); for(n=4,logint(lim\=1,2)+1, my(N=2^n-1); forstep(a=n-2,2,-1, my(A=N-1<lim, break(2)); listput(v,t)))); Vec(v) \\ Charles R Greathouse IV, Oct 21 2022
  • Python
    def a(n):
        m = 0
        while m*(m+1)*(m+2)//6 <= n: m += 1
        m -= 1 # m = A056556(n-1)
        k, r, j = m + 4, n - m*(m+1)*(m+2)//6, 0
        while r >= 0: r -= (m+1-j); j += 1
        j += 1
        return 2**k - 2**(k-j) - 2**(-r) - 1
    print([a(n) for n in range(60)]) # Michael S. Branicky, Oct 12 2022
    
  • Python
    # faster version for generating initial segment of sequence
    from itertools import combinations, count, islice
    def agen():
        for d in count(4):
            b, c = 2**d - 1, 2**(d-1)
            for i, j in combinations(range(1, d-1), 2):
                yield b - (c >> i) - (c >> j)
    print(list(islice(agen(), 60))) # Michael S. Branicky, Oct 13 2022
    
  • Python
    from math import comb, isqrt
    from sympy import integer_nthroot
    def A357773(n):
        a = (m:=integer_nthroot(6*n, 3)[0])+(n>comb(m+2,3))+3
        b = isqrt((j:=comb(a-1,3)-n+1)<<3)+3>>1
        c = j-comb((r:=isqrt(w:=j<<1))+(w>r*(r+1)),2)
        return (1<Chai Wah Wu, Dec 17 2024
    

Formula

A023416(a(n)) = 2.
a((n-1)*(n-2)*(n-3)/6 - (i-1)*(i-2)/2 - (j-1)) = 2^n - 2^i - 2^j - 1 for 1 <= j < i <= n-2. - Robert Israel, Oct 13 2022

Extensions

a(11) and beyond from Michael S. Branicky, Oct 12 2022

A007665 Tower of Hanoi with 5 pegs.

Original entry on oeis.org

1, 3, 5, 7, 11, 15, 19, 23, 27, 31, 39, 47, 55, 63, 71, 79, 87, 95, 103, 111, 127, 143, 159, 175, 191, 207, 223, 239, 255, 271, 287, 303, 319, 335, 351, 383, 415, 447, 479, 511, 543, 575, 607, 639, 671, 703, 735, 767, 799
Offset: 1

Views

Author

Keywords

References

  • A. Brousseau, Tower of Hanoi with more pegs, J. Recreational Math., 8 (1975-1976), 169-176.
  • Cull, Paul; Ecklund, E. F. On the Towers of Hanoi and generalized Towers of Hanoi problems. Proceedings of the thirteenth Southeastern conference on combinatorics, graph theory and computing (Boca Raton, Fla., 1982). Congr. Numer. 35 (1982), 229--238. MR0725883(85a:68059). - N. J. A. Sloane, Apr 08 2012
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • D. Wood, Towers of Brahma and Hanoi revisited, J. Recreational Math., 14 (1981), 17-24.

Crossrefs

Programs

  • Mathematica
    terms = 100;
    A056556 = Table[Table[m, {(m+1)(m+2)/2}], {m, 0, (6 terms)^(1/3) // Ceiling}] // Flatten;
    a[n_] := With[{t = A056556[[n+1]]}, -1+(1+t(t-1)/2+n-t(t+1)(t+2)/6)*2^t];
    Array[a, terms] (* Jean-François Alcover, Feb 28 2019 *)
  • PARI
    m=1;n=1;while(nK. Spage, Oct 23 2009

Formula

a(n) = - 1 + (1 + A056556(n)*(A056556(n) - 1)/2 + n - A056556(n)*(A056556(n) + 1)*(A056556(n) + 2)/6)*2^A056556(n). - Daniele Parisse, Feb 06 2001

A194849 Write n = C(i,3)+C(j,2)+C(k,1) with i>j>k>=0; let L[n] = [i,j,k]; sequence gives list of triples L[n], n >= 0.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Sep 03 2011

Keywords

Examples

			List of triples begins:
[2, 1, 0]
[3, 1, 0]
[3, 2, 0]
[3, 2, 1]
[4, 1, 0]
[4, 2, 0]
[4, 2, 1]
[4, 3, 0]
[4, 3, 1]
[4, 3, 2]
...
		

References

  • D. E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Section 7.2.1.3, Eq. (20), p. 360.

Crossrefs

The three columns are [A194847, A194848, A056558], or equivalently [A056556+2, A056557+1, A056558]. See A194847 for further information.

A056553 Smallest 4th-power divisible by n divided by largest 4th-power which divides n.

Original entry on oeis.org

1, 16, 81, 16, 625, 1296, 2401, 16, 81, 10000, 14641, 1296, 28561, 38416, 50625, 1, 83521, 1296, 130321, 10000, 194481, 234256, 279841, 1296, 625, 456976, 81, 38416, 707281, 810000, 923521, 16, 1185921, 1336336, 1500625, 1296, 1874161, 2085136
Offset: 1

Views

Author

Henry Bottomley, Jun 25 2000

Keywords

Examples

			a(64) = 16 because smallest 4th power divisible by 64 is 256 and largest 4th power which divides 64 is 16 and 256/16 = 16.
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := p^If[Divisible[e, 4], 0, 1]; a[n_] := (Times @@ (f @@@ FactorInteger[ n]))^4; Array[a, 100] (* Amiram Eldar, Aug 29 2019*)
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i,2]%4, f[i,1], 1))^4; } \\ Amiram Eldar, Oct 27 2022

Formula

a(n) = A053167(n)/A008835(n) = A056556(n)*A053165(n) = A056554(n)^4.
From Amiram Eldar, Oct 27 2022: (Start)
Multiplicative with a(p^e) = 1 if e is divisible by 4, and a(p^e) = p^4 otherwise.
Sum_{k=1..n} a(k) ~ c * n^5, where c = (zeta(20)/(5*zeta(4))) * Product_{p prime} (1 - 1/p^2 + 1/p^4 - 1/p^7 + 1/p^8) = 0.123026157003... . (End)

A360240 Weakly decreasing triples of positive integers sorted lexicographically and concatenated.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Feb 11 2023

Keywords

Examples

			Triples begin: (1,1,1), (2,1,1), (2,2,1), (2,2,2), (3,1,1), (3,2,1), (3,2,2), (3,3,1), (3,3,2), (3,3,3), ...
		

Crossrefs

The triples have sums A070770.
Positions of first appearances are A158842.
For pairs instead of triples we have A330709 + 1.
The zero-based version is A331195.
- The first part is A360010 = A056556 + 1.
- The second part is A194848 = A056557 + 1.
- The third part is A333516 = A056558 + 1.

Programs

  • Mathematica
    nn=9;Join@@Select[Tuples[Range[nn],3],GreaterEqual@@#&]
  • Python
    from math import isqrt, comb
    from sympy import integer_nthroot
    def A360240(n): return (m:=integer_nthroot((n-1<<1)+6,3)[0])+(n>3*comb(m+2,3)) if (a:=n%3)==1 else (k:=isqrt(r:=(b:=(n-1)//3)+1-comb((m:=integer_nthroot((n-1<<1)-1,3)[0])-(b(k<<2)*(k+1)+1) if a==2 else 1+(r:=(b:=(n-1)//3)-comb((m:=integer_nthroot((n-1<<1)-3,3)[0])+(b>=comb(m+2,3))+1,3))-comb((k:=isqrt(m:=r+1<<1))+(m>k*(k+1)),2) # Chai Wah Wu, Jun 07 2025

Formula

a(n) = A331195(n-1) + 1.

A023660 Convolution of odd numbers and A023533.

Original entry on oeis.org

1, 3, 5, 8, 12, 16, 20, 24, 28, 33, 39, 45, 51, 57, 63, 69, 75, 81, 87, 94, 102, 110, 118, 126, 134, 142, 150, 158, 166, 174, 182, 190, 198, 206, 215, 225, 235, 245, 255, 265, 275, 285, 295, 305, 315, 325, 335, 345, 355, 365, 375, 385, 395, 405
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    A023533:= func< n | Binomial(Floor((6*n-1)^(1/3)) +2, 3) ne n select 0 else 1 >;
    [(&+[(2*k+1)*A023533(n-k): k in [0..n-1]]): n in [1..80]]; // G. C. Greubel, Jul 17 2022
    
  • Mathematica
    Table[(2*k+1)*n + 6*Binomial[n+2,4], {n, 7}, {k,0,n*(n+3)/2}]//Flatten (* G. C. Greubel, Jul 17 2022 *)
  • SageMath
    def A023660(n, k): return (2*k+1)*n + 6*binomial(n+2, 4)
    flatten([[A023660(n,k) for k in (0..n*(n+3)/2)] for n in (1..7)]) # G. C. Greubel, Jul 17 2022

Formula

From G. C. Greubel, Jul 17 2022: (Start)
a(n) = Sum_{j=0..n-1} (2*j+1)*A023533(n-j).
a(n) = 2*A023543(n-1) + A056556(n).
T(n, k) = (2*k+1)*n + 6*binomial(n+2, 4), for 0 <= k <= n*(n+3)/2 and n >= 1 (as an irregular triangle). (End)
Previous Showing 11-20 of 22 results. Next