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.

A336820 A(n,k) is the n-th number that is a sum of at most k positive k-th powers; square array A(n,k), n>=1, k>=1, read by antidiagonals.

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 4, 4, 0, 1, 2, 3, 5, 5, 0, 1, 2, 3, 8, 8, 6, 0, 1, 2, 3, 4, 9, 9, 7, 0, 1, 2, 3, 4, 16, 10, 10, 8, 0, 1, 2, 3, 4, 5, 17, 16, 13, 9, 0, 1, 2, 3, 4, 5, 32, 18, 17, 16, 10, 0, 1, 2, 3, 4, 5, 6, 33, 19, 24, 17, 11, 0, 1, 2, 3, 4, 5, 6, 64, 34, 32, 27, 18, 12
Offset: 1

Views

Author

Alois P. Heinz, Aug 04 2020

Keywords

Examples

			Square array A(n,k) begins:
   0,  0,  0,  0,  0,  0,   0,   0,   0,  0,  0, ...
   1,  1,  1,  1,  1,  1,   1,   1,   1,  1,  1, ...
   2,  2,  2,  2,  2,  2,   2,   2,   2,  2,  2, ...
   3,  4,  3,  3,  3,  3,   3,   3,   3,  3,  3, ...
   4,  5,  8,  4,  4,  4,   4,   4,   4,  4,  4, ...
   5,  8,  9, 16,  5,  5,   5,   5,   5,  5,  5, ...
   6,  9, 10, 17, 32,  6,   6,   6,   6,  6,  6, ...
   7, 10, 16, 18, 33, 64,   7,   7,   7,  7,  7, ...
   8, 13, 17, 19, 34, 65, 128,   8,   8,  8,  8, ...
   9, 16, 24, 32, 35, 66, 129, 256,   9,  9,  9, ...
  10, 17, 27, 33, 36, 67, 130, 257, 512, 10, 10, ...
		

Crossrefs

A(n+j,n) for j=0-3 give: A001477(n-1), A000027, A000079, A000051.
Cf. A336725.

Programs

  • Maple
    A:= proc() local l, w, A; l, w, A:= proc() [] end, proc() [] end,
          proc(n, k) option remember; local b; b:=
            proc(x, y) option remember; `if`(x<0 or y<1, {},
              {0, b(x, y-1)[], map(t-> t+l(k)[y], b(x-1, y))[]})
            end;
            while nops(w(k)) < n do forget(b);
              l(k):= [l(k)[], (nops(l(k))+1)^k];
              w(k):= sort([select(h-> h
    				
  • Mathematica
    b[n_, k_, i_, t_] := b[n, k, i, t] = n == 0 || i > 0 && t > 0 && (b[n, k, i - 1, t] || i^k <= n && b[n - i^k, k, i, t - 1]);
    A[n_, k_] := A[n, k] = Module[{m}, For[m = 1 + If[n == 1, -1, A[n - 1, k]], !b[m, k, m^(1/k) // Floor, k], m++]; m];
    Table[A[n, 1+d-n], {d, 1, 14}, {n, 1, d}] // Flatten (* Jean-François Alcover, Dec 03 2020, using Alois P. Heinz's code for columns *)

Formula

A(n,k) = n-1 for n <= k+1.

A342688 Numbers that are the sum of five positive fifth powers in exactly three ways.

Original entry on oeis.org

13124675, 28055699, 50043937, 52679923, 53069024, 55097976, 57936559, 60484744, 62260463, 62445305, 70211956, 73133026, 79401728, 80368962, 84766210, 88512249, 93288865, 98824300, 106993391, 113055482, 117173891, 120968132, 123383875, 126416258, 131106051, 131529588, 132022925
Offset: 1

Views

Author

David Consiglio, Jr., May 18 2021

Keywords

Comments

Differs from A342687:
287618651 = 8^5 + 21^5 + 27^5 + 27^5 + 48^5
= 9^5 + 13^5 + 26^5 + 37^5 + 46^5
= 11^5 + 12^5 + 23^5 + 41^5 + 44^5
= 11^5 + 20^5 + 22^5 + 30^5 + 48^5.
So 287618651 is a term of A342687 but not a term of this sequence.
[Corrected by Patrick De Geest, Dec 28 2024]

Examples

			50043937 =  6^5 + 16^5 + 18^5 + 24^5 + 33^5
         =  7^5 + 13^5 + 21^5 + 23^5 + 33^5
         = 11^5 + 13^5 + 13^5 + 29^5 + 31^5
so 50043937 is a term of this sequence.
[Corrected by _Patrick De Geest_, Dec 28 2024]
		

Crossrefs

Programs

  • Python
    from itertools import combinations_with_replacement as cwr
    from collections import defaultdict
    keep = defaultdict(lambda: 0)
    power_terms = [x**5 for x in range(1, 500)]
    for pos in cwr(power_terms, 5):
        tot = sum(pos)
        keep[tot] += 1
    rets = sorted([k for k, v in keep.items() if v == 3])
    for x in range(len(rets)):
        print(rets[x])

A344519 Numbers that are the sum of five positive fifth powers in exactly four ways.

Original entry on oeis.org

287618651, 1386406515, 1763135232, 2494769760, 2619898293, 3096064443, 3291315732, 3749564512, 4045994624, 5142310350, 5183605813, 5658934676, 5880926107, 7205217018, 7401155424, 7691215599, 8429499101, 8926086432, 9051501568, 9203796832, 9254212901
Offset: 1

Views

Author

David Consiglio, Jr., May 21 2021

Keywords

Comments

Differs from A344518 at term 20 because
9006349824 = 8^5 + 34^5 + 62^5 + 68^5 + 92^5
= 8^5 + 41^5 + 47^5 + 79^5 + 89^5
= 12^5 + 18^5 + 72^5 + 78^5 + 84^5
= 21^5 + 34^5 + 43^5 + 74^5 + 92^5
= 24^5 + 42^5 + 48^5 + 54^5 + 96^5.

Examples

			287618651 is a term because
287618651 =  8^5 + 21^5 + 27^5 + 27^5 + 48^5
          =  9^5 + 13^5 + 26^5 + 37^5 + 46^5
          = 11^5 + 12^5 + 23^5 + 41^5 + 44^5
          = 11^5 + 20^5 + 22^5 + 30^5 + 48^5.
[Corrected by _Patrick De Geest_, Dec 28 2024]
		

Crossrefs

Programs

  • Python
    from itertools import combinations_with_replacement as cwr
    from collections import defaultdict
    keep = defaultdict(lambda: 0)
    power_terms = [x**5 for x in range(1, 500)]
    for pos in cwr(power_terms, 5):
        tot = sum(pos)
        keep[tot] += 1
    rets = sorted([k for k, v in keep.items() if v == 4])
    for x in range(len(rets)):
        print(rets[x])

A004842 Numbers that are the sum of at most 2 positive 5th powers.

Original entry on oeis.org

0, 1, 2, 32, 33, 64, 243, 244, 275, 486, 1024, 1025, 1056, 1267, 2048, 3125, 3126, 3157, 3368, 4149, 6250, 7776, 7777, 7808, 8019, 8800, 10901, 15552, 16807, 16808, 16839, 17050, 17831, 19932, 24583, 32768, 32769, 32800, 33011, 33614, 33792, 35893, 40544
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A004845.

Programs

  • Mathematica
    Select[Table[n, {n, 0, 50000}], Length[PowersRepresentations[#, 2, 5]] > 0 &] (* Vladimir Joseph Stephan Orlovsky, Jul 19 2011 *)
  • PARI
    T=thueinit('z^5+1);is(n)=n==0 || #select(v->min(v[1],v[2])>=0, thue(T, n))>0 \\ Charles R Greathouse IV, Nov 30 2014
    
  • PARI
    is(n)=for(m=sqrtnint(n\2,5), sqrtnint(n,5), if(ispower(n-m^5,5), return(1))); 0 \\ Charles R Greathouse IV, Nov 30 2014
    
  • PARI
    list(lim)=my(v=List(),n5); for(n=0,sqrtnint(lim\=1,5), n5=n^5; for(m=0, min(sqrtnint(lim-n5,5),n), listput(v, n5+m^5))); Set(v) \\ Charles R Greathouse IV, Nov 30 2014

Formula

a(n) << n^(5/2). - Charles R Greathouse IV, Nov 30 2014

A004843 Numbers that are the sum of at most 3 positive 5th powers.

Original entry on oeis.org

0, 1, 2, 3, 32, 33, 34, 64, 65, 96, 243, 244, 245, 275, 276, 307, 486, 487, 518, 729, 1024, 1025, 1026, 1056, 1057, 1088, 1267, 1268, 1299, 1510, 2048, 2049, 2080, 2291, 3072, 3125, 3126, 3127, 3157, 3158, 3189, 3368, 3369, 3400, 3611, 4149, 4150, 4181, 4392
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; n=0 or i>0 and t>0
          and (b(n, i-1, t) or i^5<=n and b(n-i^5, i, t-1))
        end:
    a:= proc(n) option remember; local k;
          for k from 1+ `if`(n=1, -1, a(n-1))
          while not b(k, iroot(k, 5), 3) do od; k
        end:
    seq(a(n), n=1..50);  # Alois P. Heinz, Sep 16 2016
  • Mathematica
    Select[Table[n, {n, 0, 6000}], Length[PowersRepresentations[#, 3, 5]] > 0 &] (* Vladimir Joseph Stephan Orlovsky, Jul 19 2011 *)
Showing 1-5 of 5 results.