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.

A226777 Higher powers that are sums of two distinct higher powers.

Original entry on oeis.org

243, 2744, 6561, 177147, 185193, 474552, 614656, 810000, 941192, 1124864, 1419857, 1500625, 3241792, 4782969, 7962624, 11239424, 16003008, 17850625, 21952000, 26873856, 28372625, 52200625, 68574961, 82312875, 117649000, 129140163, 162771336, 200201625, 238328000
Offset: 1

Views

Author

Robert Israel, Jun 17 2013

Keywords

Comments

x is in the sequence iff there are distinct y,z such that x = y + z and x,y,z are all in A076467.

Examples

			243 is in the sequence because 243 = 3^5 = 3^3 + 6^3.
		

Programs

  • Haskell
    import qualified Data.Set as Set (null, split, filter)
    import Data.Set (Set, empty, insert, member)
    a226777 n = a226777_list !! (n-1)
    a226777_list = f a076467_list empty where
       f (x:xs) s | Set.null $ Set.filter ((`member` s) . (x -)) s'
                              = f xs (x `insert` s)
                  | otherwise = x : f xs (x `insert` s)
                  where (s', _) = Set.split (x `div` 2) s
    -- Reinhard Zumkeller, Sep 13, Jun 19 2013
  • Maple
    N :=  10^12: # to get terms up to N
    S := {seq(seq(a^x, a=1 .. floor(N^(1/x))), x = 3 .. floor(log[2](N)))}:
    f:= proc(n) local L; L:= S[1..n-1] minus {S[n]/2}; nops(map2(`-`,S[n],L) intersect L) > 0 end proc;
    A:= map(t -> S[t], select(f,[$1..nops(S)]));
  • Mathematica
    max = 3*10^8; pp = Join[{1}, Table[n^k, {k, 3, Floor[Log[2, max]]}, {n, 2, Floor[max^(1/k)]}] // Flatten // Union]; Select[Total /@ Subsets[pp, {2}], MemberQ[pp, #]&] // Union (* Jean-François Alcover, Feb 14 2018 *)