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

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

A038211 Can express a(n) with the digits of a(n)^4 in order, only adding plus signs.

Original entry on oeis.org

0, 1, 7, 10, 19, 22, 25, 27, 28, 34, 36, 37, 45, 52, 54, 55, 58, 61, 63, 64, 67, 72, 73, 76, 79, 81, 82, 85, 91, 100, 103, 106, 108, 109, 112, 115, 117, 118, 121, 124, 127, 133, 135, 142, 144, 145, 148, 153, 154, 157, 162, 163, 166, 169, 172, 175, 178, 180, 181
Offset: 1

Views

Author

Keywords

Comments

All terms == 0, 1, 4 or 7 (mod 9). - Robert Israel, Sep 06 2020

Examples

			a(6)=22 is in the sequence because 22^4=234256 and 2+3+4+2+5+6=22.
a(8)=27 is in the sequence because 27^4=531441 and 5+3+14+4+1=27.
		

Crossrefs

Programs

  • Maple
    F:= proc(n,t) local d; option remember;
       if n = t then return true fi;
       if n < t then return false fi;
       for d from 1 to min(ilog10(t)+1,ilog10(n)+1) do
         if procname(floor(n/10^d), t - (n mod 10^d)) then return true fi
       od;
       false
    end proc:
    select(t -> F(t^4,t), [$0..1000]); # Robert Israel, Sep 06 2020

Extensions

Offset changed by Robert Israel, Sep 06 2020

A305706 a(n) = smallest m such that the sum of digits of n^m is greater than n, or 0 if no such m exists.

Original entry on oeis.org

0, 0, 2, 2, 2, 2, 2, 2, 2, 3, 0, 4, 3, 2, 2, 3, 3, 2, 4, 3, 14, 4, 5, 4, 4, 5, 4, 5, 6, 6, 14, 5, 6, 5, 6, 6, 6, 5, 5, 6, 14, 7, 6, 8, 6, 7, 6, 8, 7, 7, 16, 6, 6, 8, 7, 8, 7, 7, 9, 7, 15, 8, 8, 7, 8, 8, 9, 8, 8, 8, 18, 12, 9, 9, 8, 9, 9, 9, 9, 9, 18, 10, 11, 11, 10, 11, 11, 10, 9, 10, 17, 11, 11, 10, 11, 10, 12, 12, 10, 11, 0
Offset: 0

Views

Author

Max Alekseyev, Jun 08 2018

Keywords

Comments

a(n) = smallest m such that A007953(n^m) > n, or 0 if no such m exists.
If n is a term of A178501, then a(n) = 0. - Felix Fröhlich, Jun 10 2018

Crossrefs

Programs

  • PARI
    a(n) = if(sumdigits(n) < 2, return(0), my(m=2); while(1, if(sumdigits(n^m) > n, return(m)); m++)) \\ Felix Fröhlich, Jun 10 2018

A305707 Numbers n such that for every k = 1, 2, ..., A305706(n)-1, it is possible to insert plus signs into the decimal representation of n^k to make sum equal n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 14, 17, 45, 91, 100, 675, 945, 964, 990, 991, 1000, 1296, 1702, 2728, 4879, 5050, 5149, 5292, 7777, 8938, 9325, 9765, 9901, 9909, 9918, 9945, 9955, 9964, 10000, 10512, 12222, 12727, 17271, 41149, 42643, 48790, 50050, 59284, 72612, 75331, 77778, 81118, 87571, 93574, 95121, 99226, 99630, 99631, 99703, 99901, 99909, 99918, 99945, 99955, 99964, 99991, 100000, 104878, 117343, 329967, 461539
Offset: 1

Views

Author

Max Alekseyev, Jun 09 2018

Keywords

Comments

It is not possible to insert pluses in the decimal representation of n^A305706(n) to make the sum equal n.
Terms starting with a(15)=45 form a subsequence of A038206.

Examples

			For n = 45, we have A305706(n) = 6, and
n^1 = 45 with 45 = n;
n^2 = 2025 with 20+25 = n;
n^3 = 91125 with 9+11+25 = n;
n^4 = 4100625 with 4+10+0+6+25 = n;
n^5 = 184528125 with 18+4+5+2+8+1+2+5 = n.
So, 45 is a term.
		

Crossrefs

Showing 1-4 of 4 results.