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

A178354 Numbers m such that d(1)^1 + d(2)^2 + ... + d(p)^p = d(1)^p + d(2)^(p-1) +... + d(p)^1, where d(i), i=1..p, are the digits of m.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 22, 33, 44, 55, 66, 77, 88, 99, 100, 101, 110, 111, 120, 121, 130, 131, 140, 141, 150, 151, 160, 161, 170, 171, 180, 181, 190, 191, 202, 212, 222, 232, 242, 252, 262, 272, 282, 292, 303, 313, 323, 333, 343, 353, 363, 373, 383, 393, 404, 414, 424, 434, 444, 454
Offset: 1

Views

Author

Michel Lagneau, Dec 21 2010

Keywords

Comments

A179309 is included in this sequence.
All palindromes are in this sequence. - Harvey P. Dale, Mar 03 2013

Examples

			14603 is in the sequence because :
1 + 4^2 + 6^3 + 0^4 + 3^5 = 3 + 0^2 + 6^3 + 4^4 + 1^5 = 476.
		

Crossrefs

Programs

  • Maple
    with(numtheory):for n from 1 to 50000 do:l:=length(n):n0:=n:s1:=0:s2:=0:for
      m from 1 to l do:q:=n0:u:=irem(q,10):v:=iquo(q,10):n0:=v :s1:=s1+u^(l-m+1):s2:=s2+u^m:od:
      if s1=s2 then printf(`%d, `,n):else fi:od:
  • Mathematica
    drQ[n_]:=Module[{id=IntegerDigits[n],len},len=Length[id];Total[ id^Range[ len]] == Total[id^Range[len,1,-1]]]; Select[Range[500],drQ] (* Harvey P. Dale, Aug 04 2018 *)
  • PARI
    isok(m) = my(d=digits(m), p=#d); sum(k=1, p, d[k]^k) == sum(k=1, p, d[k]^(p-k+1)); \\ Michel Marcus, Mar 22 2021
    
  • Python
    def digpow(s): return sum(int(d)**i for i, d in enumerate(s, start=1))
    def aupto(limit):
      alst = []
      for k in range(1, limit+1):
        s = str(k)
        if digpow(s) == digpow(s[::-1]): alst.append(k)
      return alst
    print(aupto(454)) # Michael S. Branicky, Mar 23 2021

A342826 Numbers k such that d(1)^0 + d(2)^1 + ... + d(p)^(p-1) = d(1)^(p-1) + d(2)^(p-2) + ... + d(p)^0, where d(i), i=1..p, are the digits of k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 111, 121, 131, 141, 151, 161, 171, 181, 191, 202, 212, 222, 232, 242, 252, 262, 272, 282, 292, 303, 313, 323, 333, 343, 353, 363, 373, 383, 393, 404, 414, 424, 434, 444, 454, 464
Offset: 1

Views

Author

Carole Dubois, Mar 23 2021

Keywords

Comments

This sequence starts off like other palindromic sequences such as A178354, A002113, A110751, and A227858 but it differs starting at the 110th term: 109th: 1001, 110th: 1011, 111th: 1101, ..., 119th: 1863, etc.
Differs from A297271 (which e.g. has 1021, 1031, 1041,.. 1091 which are absent here). - R. J. Mathar, Sep 27 2021
Contains the palindromes, and palindromes where pairs of digits have been substituted by d(i)=0, d(p-i)=1 or d(i)=1, d(p-1)=0, and "genuine" numbers like 1863, 2450, 2804, 2814, 3681, 4081, 4182, 103221, 113221, 122301, 122311, 142023,.. - R. J. Mathar, Sep 27 2021

Examples

			1863 is in this sequence because 1^0 + 8^1 + 6^2 + 3^3 = 1^3 + 8^2 + 6^1 + 3^0 = 72.
		

Crossrefs

Cf. A002113 (subset), A179309, A110751, A227858.

Programs

  • Maple
    isA342826 := proc(n)
        local dgs ;
        dgs := convert(n,base,10) ;
        if  add(op(i,dgs)^(i-1),i=1..nops(dgs)) = add(op(-i,dgs)^(i-1),i=1..nops(dgs)) then
            true;
        else
            false;
        end if;
    end proc:
    A342826 := proc(n)
        option remember ;
        if n =1 then
            1;
        else
            for a from procname(n-1)+ 1 do
                if isA342826(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Sep 27 2021
  • Mathematica
    Select[Range[500],Mod[#,10]!=0&&Total[IntegerDigits[#]^Range[0,IntegerLength[ #]-1]]==Total[IntegerDigits[#]^Range[IntegerLength[#]-1,0,-1]]&] (* Harvey P. Dale, Jan 18 2023 *)
  • Python
    def digpow(s): return sum(int(d)**i for i, d in enumerate(s))
    def aupto(limit):
      alst = []
      for k in range(1, limit+1):
        s = str(k)
        if digpow(s) == digpow(s[::-1]): alst.append(k)
      return alst
    print(aupto(464)) # Michael S. Branicky, Mar 23 2021

A179310 The smallest number that has more copies of some digit than all previous terms of the sequence put together.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 22, 33, 44, 55, 66, 77, 88, 99, 100, 1111, 2222, 3333, 4444, 5555, 6666, 7777, 8888, 9999, 10000, 22222222, 33333333, 44444444, 55555555, 66666666, 77777777, 88888888, 99999999, 100000000, 1111111111
Offset: 1

Views

Author

Jack W Grahl, Jul 10 2010

Keywords

Comments

For each natural number taken in order, we consider if we can make it using digits from as many of the previous terms as we like. If we cannot, we add it to the sequence and add its digits to the 'pool' we have for making subsequent numbers.

Examples

			This sequence is the same as A179309 up to 100. After that, we can make any three-digit number because we have had at least three of each digit so far. We can make 1000 because we have already had three 0's (in 10 and 100). So the next term is 1111 because we have only seen three 1's so far.
		

Crossrefs

A subsequence of A179309.

Extensions

An error in the example (pointed out by Jon E. Schoenfield) was corrected by Jack W Grahl, Jul 19 2010
More terms from Sean A. Irvine, Nov 10 2011
Showing 1-3 of 3 results.