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

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

A254338 Initial digits of A254143 in decimal representation.

Original entry on oeis.org

1, 4, 7, 1, 2, 3, 3, 4, 6, 1, 1, 2, 2, 2, 3, 3, 3, 4, 6, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 27 2015

Keywords

Comments

a(n) = A000030(A254143(n));
also initial digits of A254323: a(n) = A000030(A254323(n)).
all terms are of the form u*v mod 10, where u <= v and belonging to {1,3,4,6,7}, the distinct elements of A254397:
length of k-th run of consecutive 1s = A005993(k-2), k > 1;
length of k-th run of consecutive 2s = k*(k+1)/2 = A000217(k), k >= 1;
length of k-th run of consecutive 3s = k+1, k >= 1;
length of k-th run of consecutive 4s = A065033(k-1);
n with a(n) = 4: A237424(n) = (10^a+10^b+1)/3 with b = 0, see also A093137, A133384;
n with a(n) = 6: A237424(n) = (10^a+10^b+1)/3 with a = b; A005994(a(n)) = 6 for n > 1; see also A199682;

Crossrefs

Programs

  • Haskell
    a254338 = a000030 . a254143
    
  • PARI
    listA237424(lim)=my(v=List(),a,t); while(1, for(b=0,a, t=(10^a+10^b+1)/3; if(t>lim, return(Set(v))); listput(v, t)); a++)
    do(lim)=my(v=List(),u=listA237424(lim),t); for(i=1,#u, for(j=1,i, t=u[i]*u[j]; if(t>lim,break); listput(v,t))); apply(n->digits(n)[1], Set(v)) \\ Charles R Greathouse IV, May 13 2015

A349278 a(n) is the product of the sum of the last i digits of n, with i going from 1 to the total number of digits of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 2, 6, 12, 20, 30, 42, 56, 72, 90, 0, 3, 8, 15, 24, 35, 48, 63, 80, 99, 0, 4, 10, 18, 28, 40, 54, 70, 88, 108, 0, 5, 12, 21, 32, 45, 60, 77, 96, 117, 0, 6, 14, 24, 36, 50, 66, 84, 104, 126, 0, 7, 16, 27, 40, 55, 72, 91, 112, 135, 0
Offset: 1

Views

Author

Michel Marcus, Nov 13 2021

Keywords

Comments

This is similar to A349194 but with digits taken in reversed order.
The only primes in the sequence are 2, 3, 5 and 7. - Bernard Schott, Dec 04 2021
The positive terms form a subsequence of A349194. - Bernard Schott, Dec 19 2021

Examples

			For n=256, a(256) = 6*(6+5)*(6+5+2) = 858.
		

Crossrefs

Cf. A349194, A349279 (fixed points).

Programs

  • Mathematica
    a[n_] := Times @@ Accumulate @ Reverse @ IntegerDigits[n]; Array[a, 70] (* Amiram Eldar, Nov 13 2021 *)
  • PARI
    a(n) = my(d=Vecrev(digits(n))); prod(i=1, #d, sum(j=1, i, d[j]));
    
  • Python
    from math import prod
    from itertools import accumulate
    def a(n): return 0 if n%10==0 else prod(accumulate(map(int, str(n)[::-1])))
    print([a(n) for n in range(1, 71)]) # Michael S. Branicky, Nov 13 2021

Formula

From Bernard Schott, Dec 04 2021: (Start)
a(n) = 0 iff n is a multiple of 10 (A008592).
a(n) = 1 iff n = 1.
a(n) = 2 (resp. 3, 4, 5, 7, 9) iff n = 10^k+1 (A000533) (resp. 2*10^k+1 (A199682), 3*10^k+1 (A199683), 4*10^k+1 (A199684), 6*10^k+1 (A199686), 8*10^k+1 (A199689)).
a(R_n) = n! where R_n = A002275(n) is repunit > 0, and n! = A000142(n).
a(n) = A349194(n) if n is palindrome (A002113). (End)

A319170 Triangular numbers of the form 2..21..1; n_times 2 followed with n_times 1; n >= 1.

Original entry on oeis.org

21, 2211, 222111, 22221111, 2222211111, 222222111111, 22222221111111, 2222222211111111, 222222222111111111, 22222222221111111111, 2222222222211111111111, 222222222222111111111111, 22222222222221111111111111, 2222222222222211111111111111, 222222222222222111111111111111, 22222222222222221111111111111111
Offset: 1

Views

Author

Ctibor O. Zizka, Sep 12 2018

Keywords

Comments

Triangular numbers of the form (5^(2x)*2^(2x+1)-10^x-1)/9. - Harvey P. Dale, Sep 16 2019

Examples

			a(1) = A000217(6) = 21; a(2) = A000217(66) = 2211; a(3) = A000217(666) = 222111.
		

Crossrefs

Programs

  • Mathematica
    Select[Table[FromDigits[Join[PadRight[{},n,2],PadRight[{},n,1]]],{n,20}], OddQ[ Sqrt[8#+1]]&] (& or *) Select[Table[(5^(2x) 2^(2x+1)-10^x-1)/9,{x,20}],OddQ[Sqrt[8#+1]]&] (* Harvey P. Dale, Sep 16 2019 *)
  • PARI
    Vec(3*x*(7 - 40*x) / ((1 - x)*(1 - 10*x)*(1 - 100*x)) + O(x^20)) \\ Colin Barker, Sep 13 2018

Formula

For n >= 1, a(n) = 2..21..1; n_times 2 followed with n_times 1.
a(n) = A000217(n_times 6), that is a(n) = A000217(A002280(n)).
a(n) = 1/9 * (2*10^n + 1) * (10^n - 1), that is a(n) = 1/9 * A199682(n) * A002283(n).
From Colin Barker, Sep 13 2018: (Start)
G.f.: 3*x*(7 - 40*x) / ((1 - x)*(1 - 10*x)*(1 - 100*x)).
a(n) = 111*a(n-1) - 1110*a(n-2) + 1000*a(n-3) for n>3
(End)

A367593 Nonnegative integers k such that (R(k) - 1)/(k + 1) is an integer, where R(k) is the digit reversal of k.

Original entry on oeis.org

0, 1, 10, 100, 147, 1000, 1099, 1407, 10000, 14007, 100000, 140007, 1000000, 1400007, 2124736, 10000000, 14000007, 100000000, 123456789, 140000007, 1000000000, 1234506789, 1400000007, 10000000000, 12345006789, 14000000007, 21247524736, 100000000000, 123450006789
Offset: 1

Views

Author

Stefano Spezia, Nov 24 2023

Keywords

Comments

Among the terms of this sequence, there are:
the powers of 10 (cf. A011557);
the numbers of the form 14*10^h + 7 = 7*A199682(h) for h > 0;
the numbers of the form 12345*10^m + 6789 = A367650(m) for m > 3.
From Chai Wah Wu, Dec 01 2023: (Start)
First digit of positive terms must be either 1 or 2. If first digit is 1, then last digit must be 0,1,4,5,7 or 9. If first digit is 2, then last digit is 6. In particular, if a, b, c are the first digit, last digit and (R(k)-1)/(k+1) of a term k>0, then (a, b, c) must take on values from one of the following triples:
(a, b, c): (1, 0, 0), (1, 1, 0), (1, 4, 2), (1, 4, 4), (1, 5, 5), (1, 7, 5),
(1, 9, 4), (1, 9, 5), (1, 9, 6), (1, 9, 7), (1, 9, 8), (1, 9, 9), (2, 6, 3).
Numbers of the form 21 [2475]* 24736 are terms of this sequence, where [2475]* denote a (possibly zero) repetition of the digits 2475. The first few terms of this form are: 2124736, 21247524736, 212475247524736, ...
Similarly numbers of the form 21261 [2475]* 24738736 are terms of this sequence:
2126124738736, 21261247524738736, 212612475247524738736, ... (End)
More generally, numbers of the form 21 [261]^k [2475]* 2473 [873]^k 6 are terms of this sequence, where [261]^k denote the digits '261' repeated k times with k>=0: e.g. 21261261247524752475247524738738736, ... It appears that all terms with first digit 2 and last digit 6 are of this form. - Chai Wah Wu, Dec 02 2023

Examples

			123456789 is a term since (987654321 - 1)/(123456789 + 1) = 8, which is an integer.
		

Crossrefs

Programs

  • Mathematica
    a={}; For[k=0, k<=10^10, k++,If[IntegerQ[(FromDigits[Reverse[IntegerDigits[k]]]-1)/(k+1)],AppendTo[a,k]]]; a
    Select[Range[0,10^6],IntegerQ[(IntegerReverse[#]-1)/(#+1)]&] (* The program generates the first 13 terms of the sequence. *) (* Harvey P. Dale, Aug 11 2024 *)
  • PARI
    isok(k) = denominator((fromdigits(Vecrev(digits(k))) - 1)/(k + 1)) == 1; \\ Michel Marcus, Nov 30 2023
  • Python
    def digit_reversal(n):
        return int(str(n)[::-1])
    def find_integers():
        result = []
        for k in range(0, 10**10):
            reversed_k = digit_reversal(k)
            if (reversed_k - 1) % (k + 1) == 0:
                result.append(k)
        return result
    integers_list = find_integers()
    print(integers_list)
    
  • Python
    from itertools import product, count, islice
    def A367593_gen(): # generator of terms
        yield from (0,1,10)
        for l in count(1):
            m = 10**(l+1)
            for d in product('0123456789',repeat=l):
                for a, b, c in ((1, 0, 0), (1, 1, 0), (1, 4, 2), (1, 5, 5), (1, 7, 5)):
                    k = a*m+int(s:=''.join(d))*10+b
                    r = b*m+int(s[::-1])*10+a
                    if c*(k+1)==r-1:
                        yield k
                a,b = 1,9
                k = a*m+int(s:=''.join(d))*10+b
                r = b*m+int(s[::-1])*10+a
                if not (r-1)%(k+1):
                    yield k
            a,b,c=2,6,3
            for d in product('0123456789',repeat=l):
                k = a*m+int(s:=''.join(d))*10+b
                r = b*m+int(s[::-1])*10+a
                if c*(k+1)==r-1:
                    yield k
    A367593_list = list(islice(A367593_gen(),20)) # Chai Wah Wu, Dec 01 2023
    

Formula

A367728(a(n)) = 1.

A356349 Primitive Niven numbers: terms of A005349 that are not ten times another term of A005349.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 18, 21, 24, 27, 36, 42, 45, 48, 54, 63, 72, 81, 84, 102, 108, 110, 111, 112, 114, 117, 126, 132, 133, 135, 140, 144, 150, 152, 153, 156, 162, 171, 190, 192, 195, 198, 201, 204, 207, 209, 216, 220, 222, 224, 225, 228, 230, 234
Offset: 1

Views

Author

Bernard Schott and Rémy Sigrist, Oct 15 2022

Keywords

Comments

A005349(k) belongs to this sequence iff A113315(k) is not a multiple of 10.
This sequence is infinite as it contains A133384 and A199682.
Each Niven number can be uniquely written as a(m)*10^z for some m > 0 and z >= 0.
This sequence contains numbers with k trailing zeros for any k >= 0; for example R(2^k) * 10^k (where R = A002275).

Examples

			190 is a term as 190 is a Niven number and 19 is not a Niven number.
192 is a term as 192 is a Niven number and 192 is not divisible by 10.
		

Crossrefs

Programs

  • PARI
    is(n, base=10) = my (s=sumdigits(n, base)); n%s==0 && (n%base || (n/base)%s)
    
  • Python
    def ok(n):
        sd = sum(map(int, str(n)))
        return sd and not n%sd and (n%10 or (n//10)%sd)
    print([k for k in range(235) if ok(k)]) # Michael S. Branicky, Oct 16 2022

A254397 Initial digits of A237424 in decimal representation.

Original entry on oeis.org

1, 4, 7, 3, 3, 6, 3, 3, 3, 6, 3, 3, 3, 3, 6, 3, 3, 3, 3, 3, 6, 3, 3, 3, 3, 3, 3, 6, 3, 3, 3, 3, 3, 3, 3, 6, 3, 3, 3, 3, 3, 3, 3, 3, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 3, 3, 3, 3, 3, 3, 3, 3
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 23 2015

Keywords

Comments

a(n) = A000030(A237424(n));
n with a(n) = 3: A237424(n) = (10^a+10^b+1)/3 with 0 <= b < a, see also A014132;
n with a(n) = 6: A237424(n) = (10^a+10^b+1)/3 with a = b, see also A199682, A254338;
length of k-th run of consecutive 3s = k+1, k > 0;
digits 0, 2, 5, 8 and 9 do not occur.

Crossrefs

Programs

  • Haskell
    a254397 = a000030 . a237424

A260702 Numbers n such that 3*n and n^2 have the same digit sum.

Original entry on oeis.org

0, 3, 6, 9, 12, 15, 18, 21, 30, 33, 39, 45, 48, 51, 60, 66, 90, 96, 99, 102, 105, 111, 120, 123, 129, 132, 150, 153, 156, 159, 162, 165, 180, 189, 195, 198, 201, 210, 225, 231, 246, 252, 255, 261, 285, 300, 330, 333, 348, 351, 390, 399, 429, 450, 453, 459, 462
Offset: 1

Views

Author

Vincenzo Librandi, Nov 17 2015

Keywords

Comments

All terms are multiple of 3.
If n is in the sequence, then so is 10*n. - Robert Israel, Apr 05 2020

Examples

			159 is in the sequence because 159^2 = 25281 and 3*159 = 477 have the same digit sum: 18.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..500] | &+Intseq(3*n) eq &+Intseq(n^2)];
    
  • Maple
    select(n -> convert(convert(3*n,base,10),`+`)=convert(convert(n^2,base,10),`+`), [seq(i,i=0..1000,3)]); # Robert Israel, Apr 05 2020
  • Mathematica
    Select[Range[0, 500], Total[IntegerDigits[3 #]] == Total[IntegerDigits[#^2]] &]
  • PARI
    isok(n) = sumdigits(3*n) == sumdigits(n^2); \\ Michel Marcus, Nov 17 2015
    
  • Sage
    [n for n in (0..500) if sum((3*n).digits())==sum((n^2).digits())] # Bruno Berselli, Nov 17 2015

Formula

A007953(A008585(a(n))) = A007953(A000290(a(n))).

A367740 a(n) = A367727(A367593(n)).

Original entry on oeis.org

-1, 0, 0, 0, 5, 0, 9, 5, 0, 5, 0, 5, 0, 5, 3, 0, 5, 0, 8, 5, 0, 8, 5, 0, 8, 5, 3, 0, 8, 5, 0, 8, 5, 3, 0, 8, 5, 0, 8, 5, 3, 0, 8, 5
Offset: 1

Views

Author

Stefano Spezia, Nov 29 2023

Keywords

Comments

Restricted to integers k where k + 1 divides R(k) - 1 the terms are (R(k) - 1) / (k + 1), where R(k) denotes the digit reversal of k. - Peter Luschny, Dec 01 2023
The 0's correspond to the powers of 10 (cf. A011557), the 5's correspond to the numbers of the form 14*10^h + 7 = 7*A199682(h) for h > 0, and the 8's correspond to the numbers of the form 12345*10^m + 6789 = A367650(m) for m > 3. The only negative term -1 corresponds to A367593(1) = 0. - Stefano Spezia, Dec 01 2023

Crossrefs

Programs

  • Python
    def A367740List(upto):
        L = []
        for n in range(upto):
            rev = int(str(n)[::-1])
            if (rev - 1) % (n + 1) == 0:
                L.append((rev - 1) // (n + 1))
        return L
    print(A367740List(10**6))  # Peter Luschny, Dec 01 2023
    
  • Python
    from itertools import product, count, islice
    def A367740_gen(): # generator of terms
        yield from (-1,0,0)
        for l in count(1):
            m = 10**(l+1)
            for d in product('0123456789',repeat=l):
                for a, b, c in ((1, 0, 0), (1, 1, 0), (1, 4, 2), (1, 5, 5), (1, 7, 5)):
                    k = a*m+int(s:=''.join(d))*10+b
                    r = b*m+int(s[::-1])*10+a
                    if c*(k+1)==r-1:
                        yield c
                a,b = 1,9
                k = a*m+int(s:=''.join(d))*10+b
                r = b*m+int(s[::-1])*10+a
                p,q = divmod(r-1,k+1)
                if not q:
                    yield p
            a,b,c=2,6,3
            for d in product('0123456789',repeat=l):
                k = a*m+int(s:=''.join(d))*10+b
                r = b*m+int(s[::-1])*10+a
                if c*(k+1)==r-1:
                    yield c
    A367740_list = list(islice(A367740_gen(),20)) # Chai Wah Wu, Dec 01 2023

Formula

-1 <= a(n) <= 9.

Extensions

a(30)-a(44) from Chai Wah Wu, Dec 02 2023
Showing 1-9 of 9 results.