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

A003328 Numbers that are the sum of 5 positive cubes.

Original entry on oeis.org

5, 12, 19, 26, 31, 33, 38, 40, 45, 52, 57, 59, 64, 68, 71, 75, 78, 82, 83, 89, 90, 94, 96, 97, 101, 108, 109, 115, 116, 120, 127, 129, 131, 134, 135, 136, 138, 143, 145, 146, 150, 152, 153, 155, 157, 162, 164, 169, 171, 172, 176, 181, 183, 188, 190, 192, 194, 195, 199
Offset: 1

Views

Author

Keywords

Comments

As the order of addition doesn't matter we can assume terms are in increasing order. - David A. Corneth, Aug 01 2020
It seems only a finite number N of positive integers are not in this sequence, and thus a(n) = n - N for all sufficiently large n. Is it true that 2243453, last term of A048927, is sufficiently large in that sense? - M. F. Hasler, Jan 04 2023

Examples

			From _David A. Corneth_, Aug 01 2020: (Start)
3084 is in the sequence as 3084 = 5^3 + 5^3 + 5^3 +  8^3 + 13^3.
4385 is in the sequence as 4385 = 4^3 + 4^3 + 9^3 + 11^3 + 13^3.
5426 is in the sequence as 5426 = 8^3 + 9^3 + 9^3 + 12^3 + 12^3. (End)
		

Crossrefs

Cf. A057906 (Complement)
Cf. A###### (x, y) = Numbers that are the sum of x nonzero y-th powers:
A000404 (2, 2), A000408 (3, 2), A000414 (4, 2), A003072 (3, 3), A003325 (3, 2), A003327 (4, 3), A003328 (5, 3), A003329 (6, 3), A003330 (7, 3), A003331 (8, 3), A003332 (9, 3), A003333 (10, 3), A003334 (11, 3), A003335 (12, 3), A003336 (2, 4), A003337 (3, 4), A003338 (4, 4), A003339 (5, 4), A003340 (6, 4), A003341 (7, 4), A003342 (8, 4), A003343 (9, 4), A003344 (10, 4), A003345 (11, 4), A003346 (12, 4), A003347 (2, 5), A003348 (3, 5), A003349 (4, 5), A003350 (5, 5), A003351 (6, 5), A003352 (7, 5), A003353 (8, 5), A003354 (9, 5), A003355 (10, 5), A003356 (11, 5), A003357 (12, 5), A003358 (2, 6), A003359 (3, 6), A003360 (4, 6), A003361 (5, 6), A003362 (6, 6), A003363 (7, 6), A003364 (8, 6), A003365 (9, 6), A003366 (10, 6), A003367 (11, 6), A003368 (12, 6), A003369 (2, 7), A003370 (3, 7), A003371 (4, 7), A003372 (5, 7), A003373 (6, 7), A003374 (7, 7), A003375 (8, 7), A003376 (9, 7), A003377 (10, 7), A003378 (11, 7), A003379 (12, 7), A003380 (2, 8), A003381 (3, 8), A003382 (4, 8), A003383 (5, 8), A003384 (6, 8), A003385 (7, 8), A003387 (9, 8), A003388 (10, 8), A003389 (11, 8), A003390 (12, 8), A003391 (2, 9), A003392 (3, 9), A003393 (4, 9), A003394 (5, 9), A003395 (6, 9), A003396 (7, 9), A003397 (8, 9), A003398 (9, 9), A003399 (10, 9), A004800 (11, 9), A004801 (12, 9), A004802 (2, 10), A004803 (3, 10), A004804 (4, 10), A004805 (5, 10), A004806 (6, 10), A004807 (7, 10), A004808 (8, 10), A004809 (9, 10), A004810 (10, 10), A004811 (11, 10), A004812 (12, 10), A004813 (2, 11), A004814 (3, 11), A004815 (4, 11), A004816 (5, 11), A004817 (6, 11), A004818 (7, 11), A004819 (8, 11), A004820 (9, 11), A004821 (10, 11), A004822 (11, 11), A004823 (12, 11), A047700 (5, 2).

Programs

  • PARI
    select( {is_A003328(n,k=5,m=3,L=sqrtnint(abs(n-k+1),m))=if( n>k*L^m || nM. F. Hasler, Aug 02 2020
    A003328_upto(N,k=5,m=3)=[i|i<-[1..#N=sum(n=1,sqrtnint(N,m),'x^n^m,O('x^N))^k], polcoef(N,i)] \\ M. F. Hasler, Aug 02 2020
    
  • Python
    from collections import Counter
    from itertools import combinations_with_replacement as combs_w_rep
    def aupto(lim):
      s = filter(lambda x: x<=lim, (i**3 for i in range(1, int(lim**(1/3))+2)))
      s2 = filter(lambda x: x<=lim, (sum(c) for c in combs_w_rep(s, 5)))
      s2counts = Counter(s2)
      return sorted(k for k in s2counts)
    print(aupto(200)) # Michael S. Branicky, May 12 2021

A134055 a(n) = Sum_{k=1..n} C(n-1,k-1) * S2(n,k) for n>0, a(0)=1, where S2(n,k) = A048993(n,k) are Stirling numbers of the 2nd kind.

Original entry on oeis.org

1, 1, 2, 8, 41, 252, 1782, 14121, 123244, 1169832, 11960978, 130742196, 1518514076, 18645970943, 241030821566, 3268214127548, 46338504902485, 685145875623056, 10538790233183702, 168282662416550040, 2784205185437851772, 47646587512911994120
Offset: 0

Views

Author

Paul D. Hanna, Oct 08 2007

Keywords

Examples

			O.g.f.: A(x) = 1 + x + 2*x^2 + 8*x^3 + 41*x^4 + 252*x^5 + 1782*x^6 + 14121*x^7 +...
where
A(x) = 1 + x/(1-x)*exp(-x/(1-x)) + 2^2*x^2/(1-2*x)^2*exp(-2*x/(1-2*x))/2! + 3^3*x^3/(1-3*x)^3*exp(-3*x/(1-3*x))/3! + 4^4*x^4/(1-4*x)^4*exp(-4*x/(1-4*x))/4! +...
simplifies to a power series in x with integer coefficients.
Illustrate the definition of the terms by:
a(4) = 1*1 + 3*7 + 3*6 + 1*1 = 41;
a(5) = 1*1 + 4*15 + 6*25 + 4*10 + 1*1 = 252;
a(6) = 1*1 + 5*31 + 10*90 + 10*65 + 5*15 + 1*1 = 1782.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; local b; b:=
          proc(h, m) option remember; `if`(h=0,
            binomial(n-1, m-1), m*b(h-1, m)+b(h-1, m+1) )
          end; b(n, 0)
        end:
    seq(a(n), n=0..22);  # Alois P. Heinz, Jun 24 2023
  • Mathematica
    Flatten[{1,Table[Sum[Binomial[n-1,k-1] * StirlingS2[n,k],{k,1,n}],{n,1,20}]}] (* Vaclav Kotesovec, Aug 11 2014 *)
  • PARI
    a(n)=if(n==0,1,sum(k=1, n, binomial(n-1, k-1)*polcoeff(1/prod(i=0, k, 1-i*x +x*O(x^(n-k))), n-k)))
    
  • PARI
    a(n)=polcoeff(sum(k=0,n+1,(k*x)^k/(1-k*x)^k*exp(-k*x/(1-k*x+x*O(x^n)))/k!),n)
    for(n=0,25,print1(a(n),", ")) \\ Paul D. Hanna, Nov 04 2012

Formula

O.g.f.: Sum_{n>=0} (n*x)^n/(1-n*x)^n * exp(-n*x/(1-n*x)) / n!. - Paul D. Hanna, Nov 04 2012
From Alois P. Heinz, Jun 24 2023: (Start)
a(n) mod 2 = A037011(n) for n >= 1.
a(n) mod 2 = 1 <=> n in { A048297 } or n = 0. (End)

Extensions

An initial '1' was added and definition changed slightly by Paul D. Hanna, Nov 04 2012

A088698 Replace 1 with 11 in binary representation of n.

Original entry on oeis.org

0, 3, 6, 15, 12, 27, 30, 63, 24, 51, 54, 111, 60, 123, 126, 255, 48, 99, 102, 207, 108, 219, 222, 447, 120, 243, 246, 495, 252, 507, 510, 1023, 96, 195, 198, 399, 204, 411, 414, 831, 216, 435, 438, 879, 444, 891, 894, 1791, 240, 483, 486, 975, 492, 987, 990
Offset: 0

Views

Author

Ralf Stephan, Oct 07 2003

Keywords

Examples

			n=9: 1001 -> 110011 = 51, so a(9) = 51.
		

Crossrefs

Ordered terms plus one are in A048297.
Same sequence sorted into ascending order: A277335, A290258 (without 0).
Main diagonal of A341520, right edge of A341521.

Programs

  • PARI
    a(n)=if(n<1,0,if(n%2==0,2*a(n/2),4*a((n-1)/2)+3))
    
  • Python
    def a(n): return int(bin(n)[2:].replace('1', '11'), 2)
    print([a(n) for n in range(55)]) # Michael S. Branicky, Feb 20 2021

Formula

a(0)=0, a(2n) = 2a(n), a(2n+1) = 4a(n) + 3.

A327616 Irregular table read by rows; the first row contains a single 1; for any n > 1, row n+1 corresponds to the ordinal transform of the terms in rows 1..n.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Jul 06 2020

Keywords

Comments

The ordinal transform of a sequence b(n) is the sequence t(n) = number of values in b(1), ..., b(n) which are equal to b(n).

Examples

			Triangle begins:
  1:  [1]
  2:  [1]
  3:  [1, 2]
  4:  [1, 2, 3, 1]
  5:  [1, 2, 3, 1, 4, 2, 1, 5]
  6:  [1, 2, 3, 1, 4, 2, 1, 5, 6, 3, 2, 7, 1, 4, 8, 1]
		

Crossrefs

Cf. A000045, A011782 (row lengths), A048297, A060138, A107946.

Programs

  • PARI
    { for (n=1, #a=vector(85), print1 (a[n]=if (n==1, a[n]=1, a[n]=o[a[k++]]++)", "); if (hammingweight(n)==1, k=0; o=vector(vecmax(a[1..n])))) }

Formula

Apparently:
- the greatest term in row n is A000045(n),
- a(n) = 1 iff n = 1 or n belongs to A060138,
- a(A048297(n+1)) = n (and this corresponds to the first occurrence of n),
- a(4^k) = A000045(2*k+1) for any k >= 0,
- a(2*4^k-1) = A000045(2*k+2) for any k >= 0.

A057227 Smallest member of smallest set S(n) of positive integers containing n which satisfies "k is in S, iff 2k-1 is in S, iff 4k is in S".

Original entry on oeis.org

1, 2, 2, 1, 2, 6, 1, 2, 2, 10, 6, 2, 1, 14, 2, 1, 2, 18, 10, 2, 6, 22, 2, 6, 1, 26, 14, 1, 2, 30, 1, 2, 2, 34, 18, 2, 10, 38, 2, 10, 6, 42, 22, 6, 2, 46, 6, 2, 1, 50, 26, 1, 14, 54, 1, 14, 2, 58, 30, 2, 1, 62, 2, 1, 2, 66, 34, 2, 18, 70, 2, 18, 10, 74, 38, 10, 2, 78, 10, 2, 6, 82, 42, 6, 22
Offset: 1

Views

Author

Henry Bottomley, Nov 23 2000

Keywords

Comments

Ratio of number of times 2 appears to number of times 1 appears tends towards (1+sqrt(5))/2. Ratio of number of times 2 appears to number of times 4m+2 appears tends towards ((1+sqrt(5))/2)^log_2(2m+1).

Examples

			a(23)=2 since if 23 is in S(23) then so are 12, 3 and 2; however 1 need not be and so the smallest member of S(23) is 2.
		

Crossrefs

All values of a(n) are 1 or of form 4m+2, i.e., A016825. a(n)=1 iff n is in A048297.
Showing 1-5 of 5 results.