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

A003338 Numbers that are the sum of 4 nonzero 4th powers.

Original entry on oeis.org

4, 19, 34, 49, 64, 84, 99, 114, 129, 164, 179, 194, 244, 259, 274, 289, 304, 324, 339, 354, 369, 419, 434, 499, 514, 529, 544, 594, 609, 628, 643, 658, 673, 674, 708, 723, 738, 769, 784, 788, 803, 849, 868, 883, 898, 913, 963, 978, 1024, 1043, 1138, 1153, 1218
Offset: 1

Views

Author

Keywords

Comments

As the order of addition doesn't matter we can assume terms are in nondecreasing order. - David A. Corneth, Aug 01 2020

Examples

			From _David A. Corneth_, Aug 01 2020: (Start)
53667 is in the sequence as 53667 = 2^4 + 5^4 + 7^4 + 15^4.
81427 is in the sequence as 81427 = 5^4 + 5^4 + 11^4 + 16^4.
106307 is in the sequence as 106307 = 3^4 + 5^4 + 5^4 + 18^4. (End)
		

Crossrefs

Cf. A047715, A309763 (more than 1 way), A344189 (exactly 2 ways), A176197 (distinct nonzero powers).
A###### (x, y): Numbers that are the form of x nonzero y-th powers.
Cf. 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

  • Maple
    # returns number of ways of writing n as a^4+b^4+c^4+d^4, 1<=a<=b<=c<=d.
    A003338 := proc(n)
        local a,i,j,k,l,res ;
        a := 0 ;
        for i from 1 do
            if i^4 > n then
                break ;
            end if;
            for j from i do
                if i^4+j^4 > n then
                    break ;
                end if;
                for k from j do
                    if i^4+j^4+k^4> n then
                        break;
                    end if;
                    res := n-i^4-j^4-k^4 ;
                    if issqr(res) then
                        res := sqrt(res) ;
                        if issqr(res) then
                            l := sqrt(res) ;
                            if l >= k then
                                a := a+1 ;
                            end if;
                        end if;
                    end if;
                end do:
            end do:
        end do:
        a ;
    end proc:
    for n from 1 do
        if A003338(n) > 0 then
            print(n) ;
        end if;
    end do: # R. J. Mathar, May 17 2023
  • Mathematica
    f[maxno_]:=Module[{nn=Floor[Power[maxno-3, 1/4]],seq}, seq=Union[Total/@(Tuples[Range[nn],{4}]^4)]; Select[seq,#<=maxno&]]
    f[1000] (* Harvey P. Dale, Feb 27 2011 *)
  • Python
    limit = 1218
    from functools import lru_cache
    qd = [k**4 for k in range(1, int(limit**.25)+2) if k**4 + 3 <= limit]
    qds = set(qd)
    @lru_cache(maxsize=None)
    def findsums(n, m):
      if m == 1: return {(n, )} if n in qds else set()
      return set(tuple(sorted(t+(q,))) for q in qds for t in findsums(n-q, m-1))
    print([n for n in range(4, limit+1) if len(findsums(n, 4)) >= 1]) # Michael S. Branicky, Apr 19 2021

A309762 Numbers that are the sum of 3 nonzero 4th powers in more than one way.

Original entry on oeis.org

2673, 6578, 16562, 28593, 35378, 42768, 43218, 54977, 94178, 105248, 106353, 122018, 134162, 137633, 149058, 171138, 177042, 178737, 181202, 195122, 195858, 198497, 216513, 234273, 235298, 235553, 264113, 264992, 300833, 318402, 318882, 324818, 334802, 346673
Offset: 1

Views

Author

Ilya Gutkovskiy, Aug 15 2019

Keywords

Examples

			2673 = 2^4 + 4^4 + 7^4 = 3^4 + 6^4 + 6^4, so 2673 is in the sequence.
		

Crossrefs

Programs

  • Maple
    N:= 10^6: # for terms <= N
    V:= Vector(N,datatype=integer[4]):
    for a from 1 while a^4 <= N do
      for b from 1 to a while a^4+b^4 <= N do
        for c from 1 to b do
          v:= a^4+b^4+c^4;
          if v > N then break fi;
          V[v]:= V[v]+1
    od od od:
    select(i -> V[i]>1, [$1..N]); # Robert Israel, Aug 19 2019
  • Mathematica
    Select[Range@350000, Length@Select[PowersRepresentations[#, 3, 4], ! MemberQ[#, 0] &] > 1 &]

A025406 Numbers that are the sum of 4 positive cubes in 2 or more ways.

Original entry on oeis.org

219, 252, 259, 278, 315, 376, 467, 522, 594, 702, 758, 763, 765, 802, 809, 819, 856, 864, 945, 980, 1010, 1017, 1036, 1043, 1073, 1078, 1081, 1118, 1134, 1160, 1225, 1251, 1352, 1367, 1368, 1374, 1375, 1393, 1397, 1423, 1430, 1458, 1460, 1465, 1467, 1484
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    N:= 2000: # for terms <= N
    S2:= {}: S1:= {}:
    for x from 1 while x^3 < N do
    for y from 1 to x while x^3 + y^3 < N do
      for z from 1 to y while x^3 + y^3 + z^3 < N do
        for w from 1 to z do
        v:= x^3 + y^3 + z^3 + w^3;
        if v > N then break fi;
        if member(v,S1) then S2:= S2 union {v}
        else S1:= S1 union {v}
        fi
    od od od od:
    sort(convert(S2,list)); # Robert Israel, Feb 24 2021

Formula

{n: A025457(n) >= 2}. - R. J. Mathar, Jun 15 2018

A344193 Numbers that are the sum of four fourth powers in exactly two ways.

Original entry on oeis.org

259, 2674, 2689, 2754, 2929, 3298, 3969, 4144, 4209, 5074, 6579, 6594, 6659, 6769, 6834, 7203, 7874, 8194, 8979, 9154, 9234, 10113, 10674, 11298, 12673, 12913, 13139, 14674, 14689, 14754, 16563, 16643, 16818, 17187, 17234, 17299, 17314, 17858, 18963, 19699, 20658, 20739, 20979, 21154, 21219, 21329, 21363
Offset: 1

Views

Author

David Consiglio, Jr., May 11 2021

Keywords

Comments

Differs from A309763 at term 32 because 16578 = 1^4 + 2^4 + 9^4 + 10^4 = 2^4 + 5^4 + 6^4 + 11^4 = 3^4 + 7^4 + 8^4 + 10^4

Examples

			2689 is a member of this sequence because 2689 = 2^4 + 2^4 + 4^4 + 7^4 = 2^4 + 3^4 + 6^4 + 6^4
		

Crossrefs

Programs

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

A344238 Numbers that are the sum of five fourth powers in two or more ways.

Original entry on oeis.org

260, 275, 340, 515, 884, 1555, 2595, 2660, 2675, 2690, 2705, 2755, 2770, 2835, 2930, 2945, 3010, 3185, 3299, 3314, 3379, 3554, 3923, 3970, 3985, 4050, 4115, 4145, 4160, 4210, 4225, 4290, 4355, 4400, 4465, 4594, 4769, 4834, 5075, 5090, 5155, 5265, 5330, 5395, 5440, 5505, 5570, 5699, 6370, 6545, 6580, 6595, 6610
Offset: 1

Views

Author

David Consiglio, Jr., May 12 2021

Keywords

Examples

			340 = 1^4 + 1^4 + 1^4 + 3^4 + 4^4
    = 2^4 + 3^4 + 3^4 + 3^4 + 3^4
so 340 is a term of this sequence.
		

Crossrefs

Programs

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

A344241 Numbers that are the sum of four fourth powers in three or more ways.

Original entry on oeis.org

16578, 43234, 49329, 53218, 54978, 57154, 93393, 106354, 107649, 108754, 138258, 151219, 160434, 168963, 173539, 177699, 178738, 181138, 183603, 185298, 195378, 195859, 196418, 197154, 197778, 201683, 202419, 209763, 211249, 216594, 217138, 223074, 234274, 235554, 235569, 236674, 237249, 237699
Offset: 1

Views

Author

David Consiglio, Jr., May 12 2021

Keywords

Examples

			49329 = 2^4 + 2^4 + 12^4 + 13^4
      = 4^4 + 8^4 +  9^4 + 14^4
      = 6^4 + 9^4 + 12^4 + 12^4
so 49329 is a term of this sequence.
		

Crossrefs

Programs

  • Python
    from itertools import combinations_with_replacement as cwr
    from collections import defaultdict
    keep = defaultdict(lambda: 0)
    power_terms = [x**4 for x in range(1,50)]
    for pos in cwr(power_terms,4):
        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])

A344644 Numbers that are the sum of four fifth powers in two or more ways.

Original entry on oeis.org

51445, 876733, 1646240, 3558289, 4062500, 5687000, 7962869, 8227494, 9792364, 9924675, 10908544, 12501135, 15249850, 18317994, 18804544, 20611151, 20983875, 21297837, 23944908, 24201342, 24598407, 27806867, 28055456, 29480343, 31584102, 32557875, 32814683, 35469555, 40882844, 45177175
Offset: 1

Views

Author

David Consiglio, Jr., May 25 2021

Keywords

Examples

			1646240 is a term because 1646240 = 9^5 + 15^5 + 15^5 + 15^5 = 11^5 + 13^5 + 13^5 + 17^5
		

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, 4):
        tot = sum(pos)
        keep[tot] += 1
    rets = sorted([k for k, v in keep.items() if v >= 2])
    for x in range(len(rets)):
        print(rets[x])

A047698 Numbers that are the sum of four positive seventh powers in two or more ways.

Original entry on oeis.org

2056364173794800, 12191487610289536, 263214614245734400, 696885239160606459, 1560510414117060608, 4497268448089227600, 18896044524917750533, 25704745581139341318, 26662783403703215232, 33691470623454003200, 44053472466326057527, 100502405478837434259
Offset: 1

Views

Author

Keywords

Examples

			4497268448089227600 = 30^7 + 42^7 + 369^7 + 447^7 = 45^7 + 270^7 + 387^7 + 438^7. - _Sean A. Irvine_, May 15 2021
		

Crossrefs

Extensions

Corrected by D. J. Bernstein (djb(AT)cr.yp.to)
a(6)-a(12) from Sean A. Irvine, May 14 2021
Showing 1-8 of 8 results.