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.

Previous Showing 11-20 of 93 results. Next

A101337 Sum of (each digit of n raised to the power (number of digits in n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 5, 10, 17, 26, 37, 50, 65, 82, 4, 5, 8, 13, 20, 29, 40, 53, 68, 85, 9, 10, 13, 18, 25, 34, 45, 58, 73, 90, 16, 17, 20, 25, 32, 41, 52, 65, 80, 97, 25, 26, 29, 34, 41, 50, 61, 74, 89, 106, 36, 37, 40, 45, 52, 61, 72, 85, 100, 117, 49, 50, 53, 58, 65
Offset: 1

Views

Author

Gordon Hamilton, Dec 24 2004

Keywords

Comments

Sometimes referred to as "narcissistic function" (in base 10). Fixed points are the narcissistic (or Armstrong, or plus perfect) numbers A005188. - M. F. Hasler, Nov 17 2019

Examples

			a(75) = 7^2 + 5^2 = 74 and a(705) = 7^3 + 0^3 + 5^3 = 468.
a(1.02e59 - 1) = 102429587095122578993551250282047487264694110769657513064859 ~ 1.024e59 is an example of n close to the limit beyond which a(n) < n for all n. - _M. F. Hasler_, Nov 17 2019
		

Crossrefs

Programs

  • Magma
    f:=func; [f(n):n in [1..75]]; // Marius A. Burtea, Nov 18 2019
  • Mathematica
    Array[Total[IntegerDigits[#]^IntegerLength[#]]&,80] (* Harvey P. Dale, Aug 27 2011 *)
  • PARI
    a(n)=my(d=digits(n)); sum(i=1,#d, d[i]^#d) \\ Charles R Greathouse IV, Aug 10 2017
    
  • PARI
    apply( A101337(n)=vecsum([d^#n|d<-n=digits(n)]), [0..99]) \\ M. F. Hasler, Nov 17 2019
    
  • Python
    def A101337(n):
        s = str(n)
        l = len(s)
        return sum(int(d)**l for d in s) # Chai Wah Wu, Feb 26 2019
    

Formula

a(n) <= A055642(n)*9^A055642(n) with equality for all n = 10^k - 1. Write n = 10^x to get a(n) < n when 1+log_10(x+1) < (x+1)(1-log_10(9)) <=> x > 59.85. It appears that a(n) < n already for all n > 1.02*10^59. - M. F. Hasler, Nov 17 2019

Extensions

Name changed by Axel Harvey, Dec 26 2011
Edited by M. F. Hasler, Nov 17 2019

A093137 Expansion of (1-7*x)/((1-x)*(1-10*x)).

Original entry on oeis.org

1, 4, 34, 334, 3334, 33334, 333334, 3333334, 33333334, 333333334, 3333333334, 33333333334, 333333333334, 3333333333334, 33333333333334, 333333333333334, 3333333333333334, 33333333333333334, 333333333333333334, 3333333333333333334, 33333333333333333334
Offset: 0

Views

Author

Paul Barry, Mar 24 2004

Keywords

Comments

Second binomial transform of 3*A001045(3n)/3+(-1)^n. Partial sums of A093138. A convex combination of 10^n and 1. In general the second binomial transform of k*Jacobsthal(3n)/3+(-1)^n is 1,1+k,1+11k,1+111k,... This is the case for k=3.
a(n) is the number of n-length sequences of decimal digits whose sum is divisible by 3. - Geoffrey Critzer, Jan 18 2014
This sequence appears in a family of curious cubic identities based on the Armstrong number 407 = A005188(13). See the formula section. For the analog identities based on 153 = A005188(10) see a comment on A246057 with the van der Poorten et al. reference and A281857. For those based on 370 = A005188(11) see A067275, A002277 and A281858. - Wolfdieter Lang, Feb 08 2017

Examples

			a(1)^2 = 16
a(2)^2 = 1156
a(3)^2 = 111556
a(4)^2 = 11115556
a(5)^2 = 1111155556
a(6)^2 = 111111555556
a(7)^2 = 11111115555556
a(8)^2 = 1111111155555556
a(9)^2 = 111111111555555556, etc... (see A102807). - _Philippe Deléham_, Oct 03 2011
Curious cubic identities: 407 = 4^3 + 0^3 + 7^3, 340067 = 34^3 + (00)^3 + 67^3, 334000677 = 334^3 + (000)^3 + 677^3, ... - _Wolfdieter Lang_, Feb 08 2017
		

References

  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See entry 3334 at p. 168.

Crossrefs

Programs

  • Mathematica
    nn=20; r=Solve[{s==4x s+3 x a+3x b+1,a==4x a+3x s+3x b,b==4x b+3x s+3x a},{s,a,b}]; CoefficientList[Series[s/.r,{x,0,nn}],x] (* Geoffrey Critzer, Jan 18 2014 *)
    Table[3*10^n/9 + 6/9, {n, 0, 20}] (* or *) NestList[10 # - 6 &, 1, 20] (* Michael De Vlieger, Feb 08 2017 *)
    LinearRecurrence[{11,-10},{1,4},20] (* Harvey P. Dale, Oct 07 2017 *)
  • PARI
    Vec((1-7*x)/((1-x)*(1-10*x)) + O (x^30)) \\ Michel Marcus, Feb 09 2017

Formula

a(n) = 3*10^n/9 + 6/9.
a(n) = 10*a(n-1)-6 with a(0)=1. - Vincenzo Librandi, Aug 02 2010
a(n)^3 + 0(n)^3 + A067275(n+1)^3 = concatenation(a(n), 0(n), A067275(n+1)) = A281859(n), where 0(n) denotes n 0's, n >= 1. - Wolfdieter Lang, Feb 08 2017
From Elmo R. Oliveira, Aug 17 2024: (Start)
E.g.f.: exp(x)*(exp(9*x) + 2)/3.
a(n) = 11*a(n-1) - 10*a(n-2) for n > 1. (End)

A010346 Base-5 Armstrong or narcissistic numbers (written in base 10).

Original entry on oeis.org

1, 2, 3, 4, 13, 18, 28, 118, 289, 353, 419, 4890, 4891, 9113, 1874374, 338749352, 2415951874
Offset: 1

Views

Author

Keywords

Comments

Zero would also satisfy the definition as the other single-digit terms, but here only positive numbers are considered. - M. F. Hasler, Nov 20 2019

Crossrefs

Cf. A010345 (a(n) written in base 5).
In other bases: A010344 (base 4), A010348 (base 6), A010350 (base 7), A010354 (base 8), A010353 (base 9), A005188 (base 10), A161948 (base 11), A161949 (base 12), A161950 (base 13), A161951 (base 14), A161952 (base 15), A161953 (base 16).

Programs

  • PARI
    A010346=select( is_A010346(n)={n==vecsum([d^#n|d<-n=digits(n,5)])}, [0..9999]) \\ This yields only terms < 10^4 (i.e., all but the last 3 terms), for illustration of is_A010346(). In older versions of PARI, use {n==sum(i=1,#n=digits(n,5),n[i]^#n)}. - M. F. Hasler, Nov 20 2019

Extensions

Edited by Joseph Myers, Jun 28 2009

A010354 Base-8 Armstrong or narcissistic numbers (written in base 10).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 20, 52, 92, 133, 307, 432, 433, 16819, 17864, 17865, 24583, 25639, 212419, 906298, 906426, 938811, 1122179, 2087646, 3821955, 13606405, 40695508, 423056951, 637339524, 6710775966, 13892162580, 32298119799, 97095152738, 98250308556, 98317417420, 125586038802
Offset: 1

Views

Author

Keywords

Comments

Like the other single-digit terms, zero would satisfy the definition (n = Sum_{i=1..k} d[i]^k when d[1..k] are the base 8 digits of n), but here only positive numbers are considered. - M. F. Hasler, Nov 20 2019

Examples

			From _M. F. Hasler_, Nov 20 2019: (Start)
20 = 24_8 (in base 8), and 2^2 + 4^2 = 20.
432 = 660_8, and 6^3 + 6^3 + 0^3 = 432; it's easy to see that 432 + 1 then also satisfies the equation, as for any term that is a multiple of 8. (End)
		

Crossrefs

Cf. A010351 (a(n) written in base 8).
In other bases: A010344 (base 4), A010346 (base 5), A010348 (base 6), A010350 (base 7), A010353 (base 9), A005188 (base 10), A161948 (base 11), A161949 (base 12), A161950 (base 13), A161951 (base 14), A161952 (base 15), A161953 (base 16).

Programs

  • PARI
    select( {is_A010354(n)=n==vecsum([d^#n|d<-n=digits(n,8)])}, [0..10^6]) \\ This gives only terms < 10^6, for illustration of is_A010354(). - M. F. Hasler, Nov 20 2019
    
  • Python
    from itertools import islice, combinations_with_replacement
    def A010354_gen(): # generator of terms
        for k in range(1,30):
            a = tuple(i**k for i in range(8))
            yield from (x[0] for x in sorted(filter(lambda x:x[0] > 0 and tuple(int(d,8) for d in sorted(oct(x[0])[2:])) == x[1], \
                              ((sum(map(lambda y:a[y],b)),b) for b in combinations_with_replacement(range(8),k)))))
    A010354_list = list(islice(A010354_gen(),20)) # Chai Wah Wu, Apr 20 2022

Extensions

Edited by Joseph Myers, Jun 28 2009

A010344 Base-4 Armstrong or narcissistic numbers (written in base 10).

Original entry on oeis.org

1, 2, 3, 28, 29, 35, 43, 55, 62, 83, 243
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A010343 (a(n) written in base 4).
In other bases: A010346 (base 5), A010348 (base 6), A010350 (base 7), A010354 (base 8), A010353 (base 9), A005188 (base 10), A161948 (base 11), A161949 (base 12), A161950 (base 13), A161951 (base 14), A161952 (base 15), A161953 (base 16).

Programs

  • PARI
    A010344=select( n->n==vecsum([d^#n|d<-n=digits(n,4)]), [0..333]) \\ M. F. Hasler, Nov 18 2019

Extensions

Edited by Joseph Myers, Jun 28 2009

A007532 Handsome numbers: sum of positive powers of its digits; a(n) = Sum_{i=1..k} d[i]^e[i] where d[1..k] are the decimal digits of a(n), e[i] > 0.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 24, 43, 63, 89, 132, 135, 153, 175, 209, 224, 226, 262, 264, 267, 283, 332, 333, 334, 357, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 407, 445, 463, 518, 598, 629, 739, 794, 849, 935, 994, 1034
Offset: 1

Views

Author

Keywords

Comments

The previous name was "Powerful numbers, Definition (2). Cf. A001694, A023052. - N. J. A. Sloane, Jan 16 2022
J. Randle has suggested the name "powerful numbers" for the perfect digital invariants A023052, equal to the sum of a fixed power of the digits. However, "powerful" usually refers to a prime factorization related property, cf. A001694 (and references there as well as on the MathWorld page). C. Rivera has suggested the name "handsome" for these numbers (in view of narcissistic numbers A005188) in his prime puzzle #15: see also contributed comments concerning terminology on that page. - M. F. Hasler, Nov 21 2019

Examples

			43 = 4^2 + 3^3 is OK; 254 = 2^7 + 5^3 + 4^0 is not OK since one of the powers is 0.
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Different from A061862.

Programs

  • Haskell
    a007532 n = a007532_list !! (n-1)
    a007532_list = filter f [1..] where
       f x = g x 0 where
         g 0 v = v == x
         g u v = if d <= 1 then g u' (v + d) else v <= x && h d
                 where h p = p <= x && (g u' (v + p) || h (p * d))
                       (u', d) = divMod u 10
    -- Reinhard Zumkeller, Jun 02 2013
    
  • Maple
    N:= 10000; # to get all entries <= N
    Sums:= proc(L,N)
      option remember;
      local x1,L1;
      x1:= L[1];
      if x1 = 1 then L1:= {1}
      else L1:= {seq(x1^j,j=1..floor(log[x1](N)))};
      fi;
      if nops(L) = 1 then L1
      else select(`<=`,{seq(seq(a+b,a=L1),b=Sums(L[2..-1],N))},N)
      fi
    end proc;
    filter:= proc(x,N)
       local L;
       L:= sort(subs(0=NULL,convert(x,base,10))) ;
       member(x, Sums(L,N));
    end proc;
    A007532:= select(filter,[$1..N],N); # Robert Israel, Apr 13 2014
  • Mathematica
    Select[Range@1000,(s=#;MemberQ[Total/@(a^#&/@Tuples[Range@If[#==1||#==0,1,Floor[Log[#,s]]]&/@(a=IntegerDigits[s])]),s])&] (* Giorgos Kalogeropoulos, Aug 18 2021 *)
  • Python
    from itertools import count, takewhile
    def cands(n, d):
        return takewhile(lambda x: x<=n, (d**i for i in count(1)))
    def handsome(s, t):
        if s == "":
            return t == 0
        if s[0] in "01":
            return handsome(s[1:], t - int(s[0]))
        return any(handsome(s[1:], t - p) for p in cands(t, int(s[0])))
    def ok(n):
        return n and handsome(str(n), n)
    print(list(filter(ok, range(1035)))) # Michael S. Branicky, Aug 18 2021

Formula

If n = d_1 d_2 ... d_k in decimal, then there are integers m_1, m_2, ..., m_k > 0 such that n = d_1^m_1 + ... + d_k^m_k.

A010348 Base-6 Armstrong or narcissistic numbers (written in base 10).

Original entry on oeis.org

1, 2, 3, 4, 5, 99, 190, 2292, 2293, 2324, 3432, 3433, 6197, 36140, 269458, 391907, 10067135, 2510142206, 2511720147, 3866632806, 3866632807, 3930544834, 4953134588, 5018649129, 6170640875, 124246559501, 4595333541803, 5341093125744, 5341093125745, 19418246235419
Offset: 1

Views

Author

Keywords

Comments

From M. F. Hasler, Nov 20 2019: (Start)
Like the other single-digit terms, zero would satisfy the definition (n = Sum_{i=1..k} d[i]^k when d[1..k] are the digits of n), but here only positive numbers are considered.
Terms a(n+1) = a(n) + 1 (n = 8, 11, 20, 28) correspond to solutions a(n) ending in a digit 0 in base 6, in which case a(n) + 1 also is a solution. (End)

Crossrefs

Cf. A010347 (a(n) written in base 6).
In other bases: A010344 (base 4), A010346 (base 5), A010350 (base 7), A010354 (base 8), A010353 (base 9), A005188 (base 10), A161948 (base 11), A161949 (base 12), A161950 (base 13), A161951 (base 14), A161952 (base 15), A161953 (base 16).

Programs

  • PARI
    select( {is_A010348(n)=n==vecsum([d^#n|d<-n=digits(n,6)])}, [0..4e5\1]) \\ Note: this yields only terms < 10^6, for illustration of is_A010348(). - M. F. Hasler, Nov 20 2019

Extensions

Edited by Joseph Myers, Jun 28 2009

A010350 Base-7 Armstrong or narcissistic numbers (written in base 10).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 10, 25, 32, 45, 133, 134, 152, 250, 3190, 3222, 3612, 3613, 4183, 9286, 35411, 191334, 193393, 376889, 535069, 794376, 8094840, 10883814, 16219922, 20496270, 32469576, 34403018, 416002778, 416352977, 420197083, 725781499, 1500022495, 15705029375, 15705029376, 28700208851
Offset: 1

Views

Author

Keywords

Comments

Like the other single-digit terms, zero would satisfy the definition (n = Sum_{i=1..k} d[i]^k when d[1..k] are the digits of n), but here only positive numbers are considered. - M. F. Hasler, Nov 20 2019

Crossrefs

Cf. A010349 (a(n) written in base 7).
In other bases: A010344 (base 4), A010346 (base 5), A010348 (base 6), A010354 (base 8), A010353 (base 9), A005188 (base 10), A161948 (base 11), A161949 (base 12), A161950 (base 13), A161951 (base 14), A161952 (base 15), A161953 (base 16).

Programs

  • PARI
    select( {is_A010350(n)=n==vecsum([d^#n|d<-n=digits(n,7)])}, [0..10^6]) \\ This yields only terms < 10^6, for illustration of is_A010350(). - M. F. Hasler, Nov 20 2019

Extensions

Edited by Joseph Myers, Jun 28 2009

A010353 Base-9 Armstrong or narcissistic numbers (written in base 10).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 41, 50, 126, 127, 468, 469, 1824, 8052, 8295, 9857, 1198372, 3357009, 3357010, 6287267, 156608073, 156608074, 403584750, 403584751, 586638974, 3302332571, 42256814922, 42256814923, 114842637961, 155896317510, 552468844242, 552468844243, 647871937482, 686031429775
Offset: 1

Views

Author

Keywords

Comments

From M. F. Hasler, Nov 20 2019: (Start)
Like the other single-digit terms, zero would satisfy the definition (n = Sum_{i=1..k} d[i]^k when d[1..k] are the base 9 digits of n), but here only positive numbers are considered.
Terms a(n+1) = a(n) + 1 (n = 11, 13, 20, 23, 25, 29, 33, 48, 51, 57) correspond to solutions a(n) that are multiples of 9, in which case a(n) + 1 is also a solution. (End)

Examples

			126 = 150_9 (= 1*9^2 + 5*9^1 + 0*9^0) = 1^3 + 5^3 + 0^3. It is easy to see that 126 + 1 then also satisfies this relation, as for all other terms that are multiples of 9. - _M. F. Hasler_, Nov 20 2019
		

Crossrefs

Cf. A010352 (a(n) written in base 9).
In other bases: A010344 (base 4), A010346 (base 5), A010348 (base 6), A010350 (base 7), A010354 (base 8), A005188 (base 10), A161948 (base 11), A161949 (base 12), A161950 (base 13), A161951 (base 14), A161952 (base 15), A161953 (base 16).

Programs

  • Mathematica
    Select[Range[9^7], # == Total[IntegerDigits[#, 9]^IntegerLength[#, 9]] &] (* Michael De Vlieger, Jan 17 2024 *)
  • PARI
    select( {is_A010353(n)=n==vecsum([d^#n|d<-n=digits(n,9)])}, [0..10^4]) \\ This gives only terms < 10^6, for illustration of is_A010353(). - M. F. Hasler, Nov 20 2019

Extensions

Edited by Joseph Myers, Jun 28 2009

A067275 Number of Fibonacci numbers A000045(k), k <= 10^n, which end in 4.

Original entry on oeis.org

0, 1, 7, 67, 667, 6667, 66667, 666667, 6666667, 66666667, 666666667, 6666666667, 66666666667, 666666666667, 6666666666667, 66666666666667, 666666666666667, 6666666666666667, 66666666666666667, 666666666666666667, 6666666666666666667, 66666666666666666667, 666666666666666666667
Offset: 0

Views

Author

Joseph L. Pe, Feb 21 2002

Keywords

Comments

Numbers n such that the digits of A000326(n), the n-th pentagonal number, begin with n. [original definition of this sequence]
The sequence 1,7,67.... has a(n) = 6*10^n/9+3/9. It is the second binomial transform of 6*A001045(3n)/3 + (-1)^n. In general the second binomial transform of k*Jacobsthal(3n)/3+(-1)^n is k*10^n/9 + (1-k/9) = 1, 1+k, 1+11k, 1+111k, ... - Paul Barry, Mar 24 2004
Except for the first two terms, these are the 3-automorphic numbers ending in 7. - Eric M. Schmidt, Aug 28 2012
From Wolfdieter Lang, Feb 08 2017: (Start)
This sequence appears in curious identities based on the Armstrong numbers 370 = A005188(11), 371 = A005188(12) and 407 = A005188(13).
For such identities based on 153 = A005188(10) see a comment in A246057 with the van der Poorten et al. reference.
For 370 these identities are A002277(n)^3 + a(n+1)^3 + 0(n)^3 = A002277(n)*10^(2*n) + a(n+1)*10^n + 0(n) = A281858(n), where 0(n) means n 0's.
For 371 these identities are A002277(n)^3 + a(n+1)^3 + (0(n-1)1)^3 = A002277(n)*10^(2*n) + a(n+1)*10^n + 0(n-1)1 = A281860(n), where 0(n-1)1 means n-1 0's followed by a 1.
For 407 these identities are A093137(n)^3 + 0(n)^3 + a(n+1)^3 = concatenation(A093137(n), 0(n), a(n+1)) = A281859(n). (End)

Examples

			a(2) = 7 because 7 of the first 10^2 Fibonacci numbers end in 4.
From _Wolfdieter Lang_, Feb 08 2017: (Start)
Curious cubic identities:
3^3 + 7^3 + 0^3 = 370, 33^3 + 67^3 + (00)^3 = 336700, 333^3 + 667^3 + (000)^3 = 333667000, ...
3^3 + 7^3 + 1^3 = 371, 33^3 + 67^3 + (01)^3 = 336701, 333^3 + 667^3 + (001)^3 = 333667001, ...
4^3 + 0^3 + 7^3 = 407, 34^3 + (00)^3 + 67^3 = 340067 , 334^3 + (000)^3 + 677^3 = 334000677, ... (End)
		

Crossrefs

Programs

  • Mathematica
    s = Fibonacci@ Range[10^5]; Table[Count[Take[s, 10^n], m_ /; Mod[m, 10] == 4], {n, 0, Floor@ Log10@ Length@ s}] (* or *) Table[Boole[n > 0] Ceiling[10^n/15], {n, 0, 20}] (* or *) CoefficientList[Series[x (1 - 4 x)/((1 - x) (1 - 10 x)), {x, 0, 20}], x] (* Michael De Vlieger, Feb 08 2017 *)
  • PARI
    a(n)=(10^n+13)\15 \\ Charles R Greathouse IV, Jun 05 2011

Formula

a(n) = ceiling((2/30)*10^n) - Benoit Cloitre, Aug 27 2002
From Paul Barry, Mar 24 2004: (Start)
G.f.: x*(1 - 4*x)/((1 - x)*(1 - 10*x)).
a(n) = 10^n/15 + 1/3 for n>0. (End)
a(n) = 10*a(n-1) - 3 for n>1. - Vincenzo Librandi, Dec 07 2010 [Immediate consequence of the previous formula, R. J. Mathar]
From Eric M. Schmidt, Oct 28 2012: (Start)
For n>0, a(n) = A199682(n-1)/3 = (2*10^(n-1) + 1)/3.
For n>=2, a(n+1) = a(n) + 6*10^n. (End)
From Elmo R. Oliveira, Jul 22 2025: (Start)
E.g.f.: (-6 + 5*exp(x) + exp(10*x))/15.
a(n) = 11*a(n-1) - 10*a(n-2) for n >= 3.
a(n) = A073553(n)/2 for n >= 1. (End)

Extensions

A073552 merged into this sequence by Eric M. Schmidt, Oct 28 2012
Previous Showing 11-20 of 93 results. Next