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.

A104113 Numbers which when chopped into one, two or more parts, added and squared result in the same number.

Original entry on oeis.org

0, 1, 81, 100, 1296, 2025, 3025, 6724, 8281, 9801, 10000, 55225, 88209, 136161, 136900, 143641, 171396, 431649, 455625, 494209, 571536, 627264, 826281, 842724, 893025, 929296, 980100, 982081, 998001, 1000000, 1679616, 2896804, 3175524, 4941729, 7441984
Offset: 1

Views

Author

Bodo Zinser, Mar 05 2005

Keywords

Comments

Every term is congruent to 0 or 1 modulo 9. - Andrea Tarantini, Sep 27 2021

Examples

			1296 is a term since (1+29+6)^2 = 36^2 = 1296.
		

Crossrefs

Programs

  • Mathematica
    Join[{0},Select[Select[Range@3000^2,Mod[#,9]<2&],(n=#;MemberQ[(Total/@(FromDigits/@#&/@Union[DeleteCases[SplitBy[#,#==-1&],{-1}]&/@(Insert[IntegerDigits@n,-1,#]&/@(List/@#&/@Rest@Subsets[Range@IntegerLength@n]))]))^2,#])&]] (* Giorgos Kalogeropoulos, Oct 28 2021 *)
  • Python
    def expr(t, d): # can you express target t with digits d, only adding +'s
        if t < 0: return False
        if t == int(d): return True
        return any(expr(t-int(d[:i]), d[i:]) for i in range(1, len(d)))
    def aupto(limit):
        alst, k, k2 = [], 0, 0
        while k2 <= limit:
            if expr(k, str(k2)):
                alst.append(k2)
            k, k2 = k+1, k2 + 2*k + 1
        return alst
    print(aupto(7500000)) # Michael S. Branicky, Sep 27 2021

Formula

a(n) = A038206(n)^2. - Andrea Tarantini, Sep 27 2021

Extensions

a(30) and beyond from Mehrad Mahmoudian, Dec 16 2019