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 19 results. Next

A047848 Array A read by diagonals; n-th difference of (A(k,n), A(k,n-1),..., A(k,0)) is (k+2)^(n-1), for n=1,2,3,...; k=0,1,2,...

Original entry on oeis.org

1, 2, 1, 5, 2, 1, 14, 6, 2, 1, 41, 22, 7, 2, 1, 122, 86, 32, 8, 2, 1, 365, 342, 157, 44, 9, 2, 1, 1094, 1366, 782, 260, 58, 10, 2, 1, 3281, 5462, 3907, 1556, 401, 74, 11, 2, 1, 9842, 21846, 19532, 9332, 2802, 586, 92, 12, 2, 1, 29525, 87382, 97657, 55988, 19609, 4682, 821, 112, 13, 2, 1
Offset: 0

Views

Author

Keywords

Examples

			Array, A(n, k), begins as:
  1, 2,  5,  14,   41, ... = A007051.
  1, 2,  6,  22,   86, ... = A047849.
  1, 2,  7,  32,  157, ... = A047850.
  1, 2,  8,  44,  260, ... = A047851.
  1, 2,  9,  58,  401, ... = A047852.
  1, 2, 10,  74,  586, ... = A047853.
  1, 2, 11,  92,  821, ... = A047854.
  1, 2, 12, 112, 1112, ... = A047855.
  1, 2, 13, 134, 1465, ... = A047856.
  1, 2, 14, 158, 1886, ... = A196791.
  1, 2, 15, 184, 2381, ... = A196792.
Downward antidiagonals, T(n, k), begins as:
      1;
      2,     1;
      5,     2,     1;
     14,     6,     2,     1;
     41,    22,     7,     2,     1;
    122,    86,    32,     8,     2,    1;
    365,   342,   157,    44,     9,    2,   1;
   1094,  1366,   782,   260,    58,   10,   2,   1;
   3281,  5462,  3907,  1556,   401,   74,  11,   2,  1;
   9842, 21846, 19532,  9332,  2802,  586,  92,  12,  2, 1;
  29525, 87382, 97657, 55988, 19609, 4682, 821, 112, 13, 2, 1;
		

Crossrefs

Cf. A047857 (row sums), A196793 (main diagonal).

Programs

  • Magma
    A:= func< n,k | ((n+3)^k +n+1)/(n+2) >; // array A047848
    [A(k,n-k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jan 11 2025
    
  • Mathematica
    A[n_, k_]:= ((n+3)^k +n+1)/(n+2);
    A047848[n_, k_]:= A[k,n-k];
    Table[A047848[n,k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Jan 11 2025 *)
  • Python
    def A(n,k): return (pow(n+3,k) +n+1)//(n+2) # array A047848
    print(flatten([[A(k,n-k) for k in range(n+1)] for n in range(13)])) # G. C. Greubel, Jan 11 2025

Formula

A(n, k) = ((n+3)^k + n + 1)/(n+2). - Ralf Stephan, Feb 14 2004
From G. C. Greubel, Jan 11 2025: (Start)
T(n, k) = ((k+3)^(n-k) + k + 1)/(k+2) (antidiagonal triangle).
T(n, n) = A196793(n).
Sum_{k=0..n} T(n, k) = A047857(n). (End)

A061076 a(n) is the sum of the products of the digits of all the numbers from 1 to n.

Original entry on oeis.org

1, 3, 6, 10, 15, 21, 28, 36, 45, 45, 46, 48, 51, 55, 60, 66, 73, 81, 90, 90, 92, 96, 102, 110, 120, 132, 146, 162, 180, 180, 183, 189, 198, 210, 225, 243, 264, 288, 315, 315, 319, 327, 339, 355, 375, 399, 427, 459, 495, 495, 500, 510, 525, 545, 570, 600, 635
Offset: 1

Views

Author

Amarnath Murthy, Apr 14 2001

Keywords

Comments

What is the asymptotic behavior of this sequence? a(n) = a(n+1) for almost all n. A weak upper bound: a(n) << n^1.91. - Charles R Greathouse IV, Jan 13 2012
A check was done for k in {i^j | 1 <= i <= 10 AND 1 <= j <= 100}. For all these values, a(k) < k^1.733. Another check for k in {i^j | 101 <= i <= 110 AND 101 <= j <= 200} gave a(k) < k^1.65324. For k in {i | 10^6 <= i <= 10^7}, a(k) < k^1.6534. So I ask: is it true that a(n) < n^1.733 and a(n) -> n^(1.65323 + o(1)), or about n^(log(45)/log(10) + o(1))? - David A. Corneth, May 17 2016
For n = 10^(k-1), the closed-form formula from Mihai Teodor (see Formula section) gives a(n) = (45^k - 45)/44, so lim_{n->oo} log(a(n))/log_10(n) = log(45) = 3.80666248977.... - Jon E. Schoenfield, Apr 10 2022
For k >= 1, a(10^k-1) = a(10^k) = ... = a(10*R_k) where R = A002275; so there is a run of 10*R_{k-1} + 2 = A047855(k) consecutive terms equal to (45/44)*(45^k-1) when n runs from 10^k-1 up to 10*R_k, this is because those numbers have one or more 0's. Example: first runs with 2, 12, 112, 1112, ... consecutive terms equal to 45, 2070, 93195, 4193820, ... start at 9, 99, 999, 9999, ... and end at 10, 110, 1110, 11110, ... - Bernard Schott, Oct 18 2022

Examples

			a(9) = a(10) = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 1*0 = 1+2+3+4+5+6+7+8+9 = 45.
		

References

  • Amarnath Murthy, Smarandache friendly numbers and a few more sequences, Smarandache Notions Journal, Vol. 12, No. 1-2-3, Spring 2001.

Crossrefs

Programs

  • Maple
    A007954:= n -> convert(convert(n,base,10),`*`):
    ListTools:-PartialSums(map(A007954,[$1..100])); # Robert Israel, May 17 2016
  • Mathematica
    Accumulate[Times@@IntegerDigits[#]& /@ Range[100]]
  • PARI
    pd(n) = my(d = digits(n)); prod(i=1, #d, d[i]);
    a(n) = sum(k=1, n, pd(k)); \\ Michel Marcus, Feb 01 2015
    
  • PARI
    a(n) = {n=digits(n); p=1; d=#n; for(i=1,#n,if(n[i]==0,d=i-1;break));
    (45/44) * (45^(#n-1)-1) + sum(i=1,d,p*=n[i]; p * (n[i]-1) * (45/44) * (45^(#n -i) - 45^(#n-i-1)) / 2)+p*(d==#n)} \\ David A. Corneth, May 17 2016
    
  • Python
    from math import prod
    def A061076(n): return sum(prod(int(d) for d in str(i)) for i in range(1,n+1)) # Chai Wah Wu, Mar 21 2022
  • Sage
    def A061076(n):
        p = 0
        i = 0
        while i < n + 1:
            p += prod(int(digit) for digit in str(i))
            i += 1
        return p # Daria Micovic, Apr 13 2016
    

Formula

a(n) = Sum_{k = 1..n} (product of the digits of k).
a(10^k-1) = (45/44)*(45^k-1). - Giovanni Resta, Oct 18 2012
From Robert Israel, May 17 2016: (Start)
Partial sums of A007954.
G.f.: (1-x)^(-1) * Sum_{n>=0} Product_{j=0..n} Sum_{k=1..9} k * x^(k*10^j).
G.f. satisfies A(x) = (x + 2*x^2 + ... + 9*x^9)*(1+(1-x^10)*A(x^10))/(1-x).
(End)
Let b(1), b(2), ..., b(k) be the digits of the base-10 expansion of n: n = b(1)*10^(k-1) + b(2)*10^(k-2) + ... + b(k). Then a(n) = b(1)*b(2)*...*b(k) + (45^k-45)/44 + (1/2)*Sum_{i=1..k} b(1)*b(2)*...*b(i)*(b(i)-1)*45^(k-i). - Mihai Teodor, Apr 09 2022

Extensions

Corrected and extended by Matthew Conroy, Apr 16 2001

A093134 A Jacobsthal trisection.

Original entry on oeis.org

1, 0, 8, 56, 456, 3640, 29128, 233016, 1864136, 14913080, 119304648, 954437176, 7635497416, 61083979320, 488671834568, 3909374676536, 31274997412296, 250199979298360, 2001599834386888, 16012798675095096, 128102389400760776, 1024819115206086200, 8198552921648689608
Offset: 0

Views

Author

Paul Barry, Mar 23 2004

Keywords

Comments

Counts closed walks at a vertex of the complete graph on 9 nodes K_9.
Second binomial transform is A047855.

Crossrefs

Other sequences with a(n+1) = 8^n - a(n) are A001045, A078008, A097073, A115341, A015518, A054878, A015521, A109499, A015531, A109500, A109501, A015552, A015565. - Vladimir Joseph Stephan Orlovsky, Dec 11 2008
Cf. A047855.

Programs

  • Magma
    [(8^n/9+8*(-1)^n/9): n in [0..20]]; // Vincenzo Librandi, Oct 11 2011
    
  • Mathematica
    k=0;lst={1, k};Do[k=8^n-k;AppendTo[lst, k], {n, 1, 5!}];lst (* Vladimir Joseph Stephan Orlovsky, Dec 11 2008 *)
    Table[(8^n + 8*(-1)^n)/9, {n,0,30}] (* or *) LinearRecurrence[{7,8}, {1,0}, 30] (* G. C. Greubel, Jan 06 2018 *)
  • PARI
    for(n=0,30, print1((8^n + 8*(-1)^n)/9, ", ")) \\ G. C. Greubel, Jan 06 2018

Formula

G.f.: (1-7*x)/(1 - 7*x - 8*x^2).
a(n) = (8^n + 8*(-1)^n)/9.
a(n) = 8*A001045(3*n-3)/3.
From Elmo R. Oliveira, Aug 17 2024: (Start)
E.g.f.: exp(-x)*(exp(9*x) + 8)/9.
a(n) = 7*a(n-1) + 8*a(n-2) for n > 1. (End)

A337718 Numbers that can be written as (m + product of digits of m) for some m.

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 23, 24, 26, 28, 29, 30, 32, 34, 35, 38, 40, 41, 42, 44, 45, 46, 47, 50, 54, 55, 56, 58, 60, 62, 65, 66, 67, 68, 70, 74, 75, 78, 80, 81, 85, 86, 88, 89, 90, 92, 94, 95, 98, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109
Offset: 1

Views

Author

Bernard Schott, Sep 16 2020

Keywords

Comments

Every integer that contains a digit 0 is a term (A011540).
When R_m with m >= 1 is in A002275, then R_m + 1 is a term (A047855 \ {1}).
Near similar:
-> Not-Colombian (A176995) are numbers that can be written as (m + sum of digits of m) for some m.
-> Bogotá numbers (A336826) are numbers that can be written as (m * product of digits of m) for some m.

Examples

			10 = 5 + 5 = 10 + (1*0) and 22 = 16 + (1*6) are terms.
		

Crossrefs

Subsequences: A011540, A047855 \ {1}.
Range of A230099.
Cf. A176995 (not Colombian), A336826 (Bogotá numbers).

Programs

  • Mathematica
    m = 100; Select[Union[Table[n + Times @@ IntegerDigits[n], {n, 0, m}]], # <= m &] (* Amiram Eldar, Sep 16 2020 *)
  • PARI
    isok(m) = {if (m==0, return (1)); for (k=1, m,  if (k+vecprod(digits(k)) == m, return (1)););} \\ Michel Marcus, Sep 17 2020
    
  • Python
    from math import prod
    def b(n): return n + prod(map(int, str(n)))
    def aupto(n): return sorted(set(b(m) for m in range(n+1) if b(m) <= n))
    print(aupto(109)) # Michael S. Branicky, Jan 09 2023

A098406 a(n) = (10^n + 17)/9.

Original entry on oeis.org

2, 3, 13, 113, 1113, 11113, 111113, 1111113, 11111113, 111111113, 1111111113, 11111111113, 111111111113, 1111111111113, 11111111111113, 111111111111113, 1111111111111113, 11111111111111113, 111111111111111113, 1111111111111111113, 11111111111111111113, 111111111111111111113
Offset: 0

Views

Author

Klaus Brockhaus, Sep 07 2004

Keywords

Comments

A097683 gives numbers k such that a(k) is prime.

Examples

			a(5) = (100000 + 17)/9 = 11113.
		

Crossrefs

Programs

  • Mathematica
    FromDigits/@Table[PadLeft[{3},n,1],{n,20}] (* Harvey P. Dale, Jun 18 2011 *)
  • PARI
    for(n=1,18,print1(((10^n)+17)/9,","))

Formula

a(1) = 3; a(n) = a(n-1) + 10^(n-1).
a(1) = 3; a(n) = 10*a(n-1) - 17.
a(n) = A047855(n)+1 = A002275(n)+2.
G.f.: (2-19*x)/((10*x-1)*(x-1)). - R. J. Mathar, Jan 27 2017
From Elmo R. Oliveira, Aug 23 2024: (Start)
E.g.f.: exp(x)*(exp(9*x) + 17)/9.
a(n) = A062397(n) - A002282(n).
a(n) = 11*a(n-1) - 10*a(n-2) for n > 1. (End)

Extensions

a(0) from Ivan Panchenko, Nov 02 2013

A378865 a(n) is the smallest positive integer k such that n*k uses none of the digits of n, or 0 if no such k exists.

Original entry on oeis.org

2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 3, 2, 2, 2, 2, 2, 2, 2, 0, 3, 2, 2, 4, 4, 3, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 3, 2, 2, 0, 2, 4, 2, 2, 2, 2, 4, 2, 12, 0, 4, 2, 2, 2, 2, 2, 2, 2, 2, 0, 4, 5, 3, 2, 2, 2, 2, 3, 2, 0, 4, 2, 2, 3, 4, 2, 2, 2, 2, 0, 3, 2, 2, 3
Offset: 1

Views

Author

Gonzalo Martínez, Dec 09 2024

Keywords

Comments

It is observed that a(10*m) = 0 and a(100*m + 5) = 0 for all positive integers m.
If m is a repdigit number (A010785) that does not have the digit 9, then a(m) = 2 and if m = 99...9, with t 9's, then a(m) = 11...2, i.e., (t - 1) 1's followed by 2, since 99...9 * 11...2 equals (t - 1) 1's followed by (t - 1) 8's, where k = 11...2 is the smallest number with this property. In other words, a(A002283(m)) = A047855(m), for all positive integers m.

Examples

			a(12) = 3, since 12*1 = 12, 12*2 = 24 have digits in common with 12, while 12*3 = 36 does not.
		

Crossrefs

Formula

a(n) = A074157(n)/n.

A093135 Expansion of g.f. (1-8*x)/((1-x)*(1-10*x)).

Original entry on oeis.org

1, 3, 23, 223, 2223, 22223, 222223, 2222223, 22222223, 222222223, 2222222223, 22222222223, 222222222223, 2222222222223, 22222222222223, 222222222222223, 2222222222222223, 22222222222222223, 222222222222222223, 2222222222222222223, 22222222222222222223, 222222222222222222223
Offset: 0

Views

Author

Paul Barry, Mar 24 2004

Keywords

Comments

Second binomial transform of 2*A001045(3*n)/3 + (-1)^n.
Partial sums of A093136.
A convex combination of 10^n and 1.
In general the second binomial transform of k*Jacobsthal(3*n)/3 + (-1)^n is 1, 1+k, 1+11*k, 1+111*k, ... This is the case for k=2.
Essentially the same as A091628 (cf. 2nd formula). - Georg Fischer, Oct 06 2018
a(n) is 3^n represented in bijective base-3 numeration. - Alois P. Heinz, Aug 26 2019

Crossrefs

Formula

a(n) = (2*10^n + 7)/9.
a(n) = 10*a(n-1) - 7 (with a(0)=1). - Vincenzo Librandi, Aug 02 2010
From Elmo R. Oliveira, Apr 03 2025: (Start)
E.g.f.: exp(x)*(7 + 2*exp(9*x))/9.
a(n) = 11*a(n-1) - 10*a(n-2).
a(n) = (A062397(n) - A002279(n))/2. (End)

Extensions

More terms from Elmo R. Oliveira, Apr 03 2025

A115549 Numbers k such that the concatenation of k with 8*k gives a square.

Original entry on oeis.org

3, 12, 28, 63, 112, 278, 1112, 2778, 11112, 27778, 111112, 277778, 1111112, 2777778, 4938272, 7716050, 11111112, 12802888, 13151250, 13504288, 13862002, 14224392, 14591458, 14963200, 15339618, 15720712, 16106482, 16496928, 16892050, 17291848, 17696322, 18105472
Offset: 1

Views

Author

Giovanni Resta, Jan 25 2006

Keywords

Comments

If k = 10*R_m + 2, with m >= 1, then the concatenation of k with 8*k equals (30*R_m + 6)^2, so A047855 \ {1,2} is a subsequence. - Bernard Schott, Apr 09 2022
Numbers k such that A009470(k) is a square. - Michel Marcus, Apr 09 2022
The numbers 28, 278, 2778, ..., 2*10^k + 7*(10^k - 1)/9 + 1, ..., k >= 1, are terms, because the concatenation forms the squares 28224 = 168^2, 2782224 = 1668^2, 277822224 = 16668^2, ..., (10^m + 2*(10^m - 1)/3 + 2)^2, m >= 2, ... - Marius A. Burtea, Apr 10 2022

Examples

			3_24 = 18^2.
11112_88896 = 33336^2.
		

Crossrefs

Programs

  • Magma
    [n:n in [1..20000000]|IsSquare(Seqint(Intseq(8*n) cat Intseq(n)))]; // Marius A. Burtea, Apr 10 2022
  • PARI
    isok(k) = issquare(eval(Str(k, 8*k))); \\ Michel Marcus, Apr 09 2022
    

Extensions

More terms from Marius A. Burtea, Apr 13 2022

A164898 First differences of numbers having only odd digits in their decimal representation.

Original entry on oeis.org

2, 2, 2, 2, 2, 2, 2, 2, 2, 12, 2, 2, 2, 2, 12, 2, 2, 2, 2, 12, 2, 2, 2, 2, 12, 2, 2, 2, 2, 12, 2, 2, 2, 2, 12, 2, 2, 2, 2, 12, 2, 2, 2, 2, 12, 2, 2, 2, 2, 12, 2, 2, 2, 2, 112, 2, 2, 2, 2, 12, 2, 2, 2, 2, 12, 2, 2, 2, 2, 12, 2, 2, 2, 2, 12, 2, 2, 2, 2, 112, 2, 2, 2, 2, 12, 2, 2, 2, 2, 12, 2, 2, 2, 2, 12
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 30 2009

Keywords

Comments

a(n) = A014261(n+1) - A014261(n);
all terms are of the form (10^k + 8)/9, see A047855;
a(n) > 2 iff A014261(n) mod 10 = 9.

Crossrefs

Cf. A014261.

Programs

  • Maple
    R[1]:= [1,3,5,7,9]:
    for d from 2 to 3 do
      R[d]:= map(t -> seq(10*t+i,i=[1,3,5,7,9]),R[d-1])
    od:
    B:= map(op,[seq(R[d],d=1..3)]):
    B[2..-1]-B[1..-2]; # Robert Israel, Jan 24 2022
  • Mathematica
    Differences[Select[Range[1000],Count[IntegerDigits[#],?EvenQ]==0&]] (* _Harvey P. Dale, Jan 03 2019 *)

A196791 a(n) = A047848(9, n).

Original entry on oeis.org

1, 2, 14, 158, 1886, 22622, 271454, 3257438, 39089246, 469070942, 5628851294, 67546215518, 810554586206, 9726655034462, 116719860413534, 1400638324962398, 16807659899548766, 201691918794585182, 2420303025535022174, 29043636306420266078, 348523635677043192926
Offset: 0

Views

Author

Vincenzo Librandi, Oct 11 2011

Keywords

Crossrefs

Cf. A001021 (first differences).

Programs

  • Magma
    [(12^n+10)/11: n in [0..20]];
    
  • Mathematica
    LinearRecurrence[{13,-12},{1,2},30] (* Harvey P. Dale, Sep 07 2015 *)
    (12^Range[0,40] +10)/11 (* G. C. Greubel, Jan 17 2025 *)
  • Python
    def A196791(n): return (pow(12, n) + 10)//11
    print([A196791(n) for n in range(41)]) # G. C. Greubel, Jan 17 2025

Formula

a(n) = (12^n + 10)/11.
a(n) = 12*a(n-1) - 10, with a(0) = 1.
G.f.: (1-11*x)/((1-x)*(1-12*x)). - Bruno Berselli, Oct 11 2011
From Elmo R. Oliveira, Aug 30 2024: (Start)
E.g.f.: exp(x)*(exp(11*x) + 10)/11.
a(n) = 13*a(n-1) - 12*a(n-2) for n > 1. (End)
Showing 1-10 of 19 results. Next