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-10 of 11 results. Next

A199682 a(n) = 2*10^n + 1.

Original entry on oeis.org

3, 21, 201, 2001, 20001, 200001, 2000001, 20000001, 200000001, 2000000001, 20000000001, 200000000001, 2000000000001, 20000000000001, 200000000000001, 2000000000000001, 20000000000000001, 200000000000000001, 2000000000000000001
Offset: 0

Views

Author

Vincenzo Librandi, Nov 09 2011

Keywords

Comments

Numbers k such that (R(k) - 1)/(k + 1) = 1/2, where R(k) denotes the digit reversal of k (cf. A004086). - Stefano Spezia, Nov 25 2023

Crossrefs

Programs

  • Haskell
    a199682 = (+ 1) . (* 2) . (10 ^)  -- Reinhard Zumkeller, Jan 30 2015
    
  • Magma
    [2*10^n+1: n in [0..30]];
    
  • Mathematica
    NestList[10#-9&,3,20] (* or *) LinearRecurrence[{11,-10},{3,21},20] (* Harvey P. Dale, Sep 30 2017 *)
  • PARI
    a(n)=2*10^n+1 \\ Charles R Greathouse IV, Oct 16 2015

Formula

a(n) = 10*a(n-1)-9.
a(n) = 11*a(n-1)-10*a(n-2).
G.f.: 3*(1-4*x)/((1-x)*(1-10*x)).
E.g.f.: 2*exp(10*x) + exp(x). - Stefano Spezia, Nov 25 2023

A349194 a(n) is the product of the sum of the first i digits of n, as i goes from 1 to the total number of digits of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 49, 56, 63, 70, 77
Offset: 1

Views

Author

Malo David, Nov 10 2021

Keywords

Comments

The only primes in the sequence are 2, 3, 5 and 7. - Bernard Schott, Nov 23 2021

Examples

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

Crossrefs

Cf. A055642, A284001 (binary analog), A349190 (fixed points).
Cf. A007953 (sum of digits), A059995 (floor(n/10)).
Cf. A349278 (similar, with the last digits).

Programs

  • Magma
    f:=func; [f(n):n in [1..100]]; // Marius A. Burtea, Nov 23 2021
  • Mathematica
    Table[Product[Sum[Part[IntegerDigits[n],j],{j,i}],{i,Length[IntegerDigits[n]]}],{n,74}] (* Stefano Spezia, Nov 10 2021 *)
  • PARI
    a(n) = my(d=digits(n)); prod(i=1, #d, sum(j=1, i, d[j])); \\ Michel Marcus, Nov 10 2021
    
  • PARI
    first(n)=if(n<9,return([1..n])); my(v=vector(n)); for(i=1,9,v[i]=i); for(i=10,n, v[i]=sumdigits(i)*v[i\10]); v \\ Charles R Greathouse IV, Dec 04 2021
    
  • Python
    from math import prod
    from itertools import accumulate
    def a(n): return prod(accumulate(map(int, str(n))))
    print([a(n) for n in range(1, 100)]) # Michael S. Branicky, Nov 10 2021
    

Formula

For n>10: a(n) = a(A059995(n))*A007953(n) where A059995(n) = floor(n/10).
In particular, for n<100: a(n) = floor(n/10)*A007953(n)
From Bernard Schott, Nov 23 2021: (Start)
a(n) = 1 iff n = 10^k, k >= 0 (A011557).
a(n) = 2 iff n = 10^k + 1, k >= 0 (A000533 \ {1}).
a(n) = 3 iff n = 10^k + 2, k >= 0 (A133384).
a(n) = 5 iff n = 10^k + 4, k >= 0.
a(n) = 7 iff n = 10^k + 6, k >= 0. (End)
From Marius A. Burtea, Nov 23 2021: (Start)
a(A002275(n)) = n! = A000142(n), n >= 1.
a(A090843(n - 1)) = (2*n - 1)!! = A001147(n), n >= 1.
a(A097166(n)) = (3*n - 2)!!! = A007559(n).
a(A093136(n)) = 2^n = A000079(n).
a(A093138(n)) = 3^n = A000244(n). (End)

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

A126109 a(n) = (5*10^n + 1)/3.

Original entry on oeis.org

2, 17, 167, 1667, 16667, 166667, 1666667, 16666667, 166666667, 1666666667, 16666666667, 166666666667, 1666666666667, 16666666666667, 166666666666667, 1666666666666667, 16666666666666667, 166666666666666667, 1666666666666666667, 16666666666666666667, 166666666666666666667
Offset: 0

Views

Author

Alex P. Lamoreux (Chamale_ic(AT)hotmail.com), Mar 05 2007

Keywords

Comments

a(n+1)*(10^n)*(10^n+1) is the sum of squares of the positive even numbers not exceeding 10^n. - Graeme McRae, Aug 22 2021

Crossrefs

Cf. A011557.
One sixth of A133384.

Programs

Formula

From Vincenzo Librandi, Nov 09 2011: (Start)
a(n) = 10*a(n-1) - 3.
a(n) = 11*a(n-1) - 10*a(n-2).
G.f.: (2-5*x)/((1-x)*(1-10*x)). (End)
E.g.f.: exp(x)*(1 + 5*exp(9*x))/3. - Stefano Spezia, Nov 30 2023

Extensions

Edited by Don Reble, Mar 09 2007

A133472 a(n) = 10^n + 5.

Original entry on oeis.org

6, 15, 105, 1005, 10005, 100005, 1000005, 10000005, 100000005, 1000000005, 10000000005, 100000000005, 1000000000005, 10000000000005, 100000000000005, 1000000000000005, 10000000000000005, 100000000000000005, 1000000000000000005, 10000000000000000005, 100000000000000000005
Offset: 0

Views

Author

Paul Curtz, Nov 29 2007

Keywords

Crossrefs

Programs

  • Magma
    [10^n+5: n in [0..20]]; // Vincenzo Librandi, Aug 10 2011
    
  • Mathematica
    Join[{6},Table[10*FromDigits[PadRight[{1},n,0]]+5,{n,20}]] (* or *) LinearRecurrence[{11,-10},{6,15},20] (* Harvey P. Dale, Sep 06 2020 *)
  • PARI
    apply( {A133472(n)=10^n+5}, [0..20]) \\ M. F. Hasler, Jun 15 2025

Formula

From R. J. Mathar, Nov 30 2007: (Start)
O.g.f.: -3*(-2+17*x)/((-1+x)*(-1+10*x)) = -5/(-1+x) - 1/(-1+10*x).
a(n) = 10*a(n-1) - 45. (End)
a(n) = 10^n + 5. - Vincenzo Librandi, Aug 10 2011
From Elmo R. Oliveira, Jun 09 2025: (Start)
E.g.f.: exp(x)*(5 + exp(9*x)).
a(n) = 11*a(n-1) - 10*a(n-2).
a(n) = 3*A133473(n). (End)

Extensions

Renamed by editors, Jun 16 2025

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

A254398 Final digits of A237424 in decimal representation.

Original entry on oeis.org

1, 4, 7, 4, 7, 7, 4, 7, 7, 7, 4, 7, 7, 7, 7, 4, 7, 7, 7, 7, 7, 4, 7, 7, 7, 7, 7, 7, 4, 7, 7, 7, 7, 7, 7, 7, 4, 7, 7, 7, 7, 7, 7, 7, 7, 4, 7, 7, 7, 7, 7, 7, 7, 7, 7, 4, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 4, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 4, 7, 7, 7, 7, 7, 7, 7
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 23 2015

Keywords

Comments

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

Crossrefs

Programs

  • Haskell
    a254398 = flip mod 10 . 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))).

A348589 a(n) = (10^n+2)^2 / 6.

Original entry on oeis.org

24, 1734, 167334, 16673334, 1666733334, 166667333334, 16666673333334, 1666666733333334, 166666667333333334, 16666666673333333334, 1666666666733333333334, 166666666667333333333334, 16666666666673333333333334, 1666666666666733333333333334
Offset: 1

Views

Author

Bernard Schott, Oct 24 2021

Keywords

Comments

Numbers q.r such that q.r = 3*q*r, when q and r have the same number of digits, "." means concatenation, r = 2q and r may not begin with 0.
We must solve the Diophantine equation q.r = q*10^m+r = 3 * q*r where m = length(q) = length(r).
The number of solutions is infinite with (r, q) = ((10^n+2)/3, (10^n+2)/6) and n >= 1.
Note that 15 satisfies also q.r = 3*q*r, 15 = 3*1*5 with here r = 5*q.
For further information about the general equation q.r = k * q*r, see A347541.
Problem proposed on the French website Diophante (see link).

Examples

			a(1) = 12^2 / 6 = 24 and 2.4 = 3 * 2*4.
a(2) = 102^2 / 6 = 1734 and 17.34 = 3 * 17*34.
		

Crossrefs

Subsequence of A347541.

Programs

  • Maple
    seq((10^n+2)^2 / 6, n=1..14);
  • Mathematica
    Table[(10^n + 2)^2/6, {n, 1, 14}] (* Amiram Eldar, Oct 24 2021 *)
    LinearRecurrence[{111,-1110,1000},{24,1734,167334},20] (* Harvey P. Dale, Sep 05 2025 *)
  • Python
    def a(n): return (10**n+2)**2//6
    print([a(n) for n in range(1, 15)]) # Michael S. Branicky, Oct 24 2021

Formula

a(n) = (10^n+2)^2 / 6.
a(n) = A133384(n-1)^2/6.
G.f.: 6*x*(4-155*x+250*x^2)/((1-x)*(1-10*x)*(1-100*x)). - Stefano Spezia, Oct 25 2021
a(n) = 3*A102807(n)/2. - Hugo Pfoertner, Oct 30 2021

A350382 a(n) = 9 + 4 * 10^n.

Original entry on oeis.org

49, 409, 4009, 40009, 400009, 4000009, 40000009, 400000009, 4000000009, 40000000009, 400000000009, 4000000000009, 40000000000009, 400000000000009, 4000000000000009, 40000000000000009, 400000000000000009, 4000000000000000009, 40000000000000000009, 400000000000000000009, 4000000000000000000009
Offset: 1

Views

Author

Bernard Schott, Dec 28 2021

Keywords

Comments

The 4th problem of 16th Tournament of Towns in 1994-1995, Spring tour 1995, 8-9 grades, Training option, asked for a proof that the number 400...009 with at least one zero is not a perfect square (see link).
Indeed, the first few squares whose digits are 0, 4 and 9 are 4900, 9409, 490000, 940900, 994009, ... (comes from A019544).
Generalization: the 4th problem of 16th Tournament of Towns in 1994-1995, Spring tour 1995, 10-11 grades, Training option, asked for a proof that the number d00...009 with at least one zero is not a perfect square, when d is a digit with 1 <= d <= 9 (see link).

Examples

			a(3) = 9 + 4 * 10^3 = 4009 = 19 * 211 is not a square.
		

References

  • Steve Dinh, The Hard Mathematical Olympiad Problems And Their Solutions, AuthorHouse, 2011, Problem 1 (in fact, it is Problem 4) of Tournament of Towns 1995, page 301.

Crossrefs

Programs

  • Maple
    Data := [seq(9 + 4*10^n,  n = 1..20)];
  • Mathematica
    a[n_] := 9 + 4*10^n; Array[a, 20] (* Amiram Eldar, Dec 28 2021 *)

Formula

a(n) = 9 + 4*10^n = 4*A133384(n-1) + 1.
a(n) = 24*A126109(n-1) + 1 = 10*A199684(n-1) - 1. - Hugo Pfoertner, Dec 28 2021
From Stefano Spezia, Dec 28 2021: (Start)
G.f.: x*(49 - 130*x)/((1 - x)*(1 - 10*x)).
a(n) = 11*a(n-1) - 10*a(n-2) for n > 2. (End)
Showing 1-10 of 11 results. Next