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

A256786 Numbers which are divisible by prime(d) for all digits d in their decimal representation.

Original entry on oeis.org

12, 14, 42, 55, 154, 222, 228, 714, 1122, 1196, 1212, 1414, 2112, 2142, 2262, 3355, 4144, 4242, 5335, 5544, 5555, 6162, 9499, 11112, 11144, 11214, 11424, 11466, 11622, 11818, 11914, 12222, 12882, 14112, 15554, 16666, 21216, 21222, 21252, 21888, 22122, 22212
Offset: 1

Views

Author

Keywords

Comments

All terms are zerofree, cf. A052382;
there is no term containing digits 1 and 3 simultaneously;
a(n) contains at least one digit 1 iff a(n) is even, cf. A011531, A005843;
a(n) contains at least one digit 2 iff a(n) mod 3 = 0, cf. A011532, A008585;
a(n) contains at least one digit 3 iff a(n) mod 10 = 5, cf. A011533, A017329;
A020639(a(n)) <= 23.
The equivalent in base 2 is the empty sequence, in base 3 it is A191681\{0}; see A256874-A256879 for the base 4 - base 9 variant, and A256870 for a variant where digits 0 are allowed but divisibility by prime(d+1) is required instead. - M. F. Hasler, Apr 11 2015

Examples

			Smallest terms containing the nonzero decimal digits:
.  d | prime(d) |  n | a(n)
. ---+----------+--------------------------
.  1 |       2  |  1 |   12 = 2^2 * 3
.  2 |       3  |  1 |   12 = 2^2 * 3
.  3 |       5  | 16 | 3355 = 5 * 11 * 61
.  4 |       7  |  2 |   14 = 2 * 7
.  5 |      11  |  4 |   55 = 5 * 11
.  6 |      13  | 10 | 1196 = 2^2 * 13 * 23
.  7 |      17  |  8 |  714 = 2 * 3 * 7 * 17
.  8 |      19  |  7 |  228 = 2^2 * 3 * 19
.  9 |      23  | 10 | 1196 = 2^2 * 13 * 23 .
		

Crossrefs

Programs

  • Haskell
    a256786 n = a256786_list !! (n-1)
    a256786_list = filter f a052382_list where
       f x = g x where
         g z = z == 0 || x `mod` a000040 d == 0 && g z'
               where (z', d) = divMod z 10
    
  • Mathematica
    Select[Range@22222,FreeQ[IntegerDigits[#],0]&&Total[Mod[#,Prime[IntegerDigits[#]]]]==0&] (* Ivan N. Ianakiev, Apr 11 2015 *)
  • PARI
    is_A256786(n)=!for(i=1,#d=Set(digits(n)),(!d[i]||n%prime(d[i]))&&return) \\ M. F. Hasler, Apr 11 2015
    
  • Python
    primes = [1, 2, 3, 5, 7, 11, 13, 17, 19, 23]
    def ok(n):
        s = str(n)
        return "0" not in s and all(n%primes[int(d)] == 0 for d in s)
    print([k for k in range(22213) if ok(k)]) # Michael S. Branicky, Dec 14 2021

A125857 Numbers whose base-9 representation is 22222222.......2.

Original entry on oeis.org

0, 2, 20, 182, 1640, 14762, 132860, 1195742, 10761680, 96855122, 871696100, 7845264902, 70607384120, 635466457082, 5719198113740, 51472783023662, 463255047212960, 4169295424916642, 37523658824249780, 337712929418248022
Offset: 1

Views

Author

Zerinvary Lajos, Feb 03 2007

Keywords

Comments

If f(1) := 1/x and f(n+1) = (f(n) + 2/f(n))/3, then f(n) = 3^(1-n) * (1/x + a(n)*x + O(x^3)). - Michael Somos, Jul 28 2020

Examples

			G.f. = 2*x^2 + 20*x^3 + 182*x^4 + 1640*x^5 + 14762*x^6 + 132860*x^7 + ... - _Michael Somos_, Jul 28 2020
		

Crossrefs

Cf. A002452.

Programs

  • Maple
    seq((9^n-1)*2/8, n=0..19);
  • Mathematica
    FromDigits[#, 9]&/@Table[PadRight[{2}, n, 2], {n, 0, 20}] (* Harvey P. Dale, Feb 02 2011 *)
    Table[(9^(n - 1) - 1)*2/8, {n, 20}] (* Wesley Ivan Hurt, Mar 29 2014 *)
  • PARI
    Vec(2*x^2/((x-1)*(9*x-1)) + O(x^100)) \\ Colin Barker, Sep 30 2014
    
  • PARI
    {a(n) = (9^(n-1) - 1)/4}; /* Michael Somos, Jul 02 2017 */

Formula

a(n) = (9^(n-1) - 1)*2/8.
a(n) = 9*a(n-1) + 2 (with a(1)=0). - Vincenzo Librandi, Sep 30 2010
a(n) = 2 * A002452(n). - Vladimir Pletser, Mar 29 2014
From Colin Barker, Sep 30 2014: (Start)
a(n) = 10*a(n-1) - 9*a(n-2).
G.f.: 2*x^2 / ((x-1)*(9*x-1)). (End)
a(n) = -a(2-n) * 9^(n-1) for all n in Z. - Michael Somos, Jul 02 2017
a(n) = A191681(n-1)/2. - Klaus Purath, Jul 03 2020

A350993 Triangular numbers that are palindromes in base 9.

Original entry on oeis.org

0, 1, 3, 6, 10, 91, 136, 300, 528, 820, 4560, 7381, 11476, 20910, 42486, 66430, 552826, 581581, 597871, 1664400, 2001000, 3420420, 3444000, 5070520, 5380840, 48427561, 75995956, 132494781, 134553810, 137158203, 159213090, 290585778, 434520460, 435848050, 669615310
Offset: 1

Views

Author

Amiram Eldar, Jan 28 2022

Keywords

Comments

This sequence is infinite since A000217((9^k-1)/2) is a term for all k >= 0 (Wishard, 1931).
Also, A000217((3 + 5*9^k)/2) is a term for all k>=0 (Trigg, 1984).

Examples

			10 is a term since 10 = A000217(4) is a triangular number and also a palindromic number in base 9: 10 = 11_9.
91 is a term since 91 = A000217(13) is a triangular number and also a palindromic number in base 9: 91 = 111_9.
		

References

  • Charles W. Trigg, Mathematical Quickies, McGraw Hill Book Co., 1967, Q112, p. 127.

Crossrefs

Intersection of A000217 and A029955.
The nonary version of A003098.

Programs

  • Mathematica
    t[n_] := n*(n + 1)/2; Select[t /@ Range[0, 3*10^5], PalindromeQ[IntegerDigits[#, 9]] &]

A255043 a(n) = (5*9^n - 1)/2.

Original entry on oeis.org

2, 22, 202, 1822, 16402, 147622, 1328602, 11957422, 107616802, 968551222, 8716961002, 78452649022, 706073841202, 6354664570822, 57191981137402, 514727830236622, 4632550472129602, 41692954249166422, 375236588242497802, 3377129294182480222
Offset: 0

Views

Author

L. Edson Jeffery, Feb 13 2015

Keywords

Crossrefs

Programs

  • Magma
    [(5*9^n -1)/2: n in [0..20]]; // G. C. Greubel, Feb 07 2021
  • Mathematica
    Table[(5*9^n - 1)/2, {n, 0, 19}]
    LinearRecurrence[{10,-9},{2,22},20] (* Harvey P. Dale, Jun 15 2018 *)
  • Sage
    [(5*9^n -1)/2 for n in (0..20)] # G. C. Greubel, Feb 07 2021
    

Formula

G.f.: 2*(1+x)/((1-x)*(1-9*x)).
Recurrence: a(n) = 10*a(n-1) - 9*a(n-2), n>=2, a(0) = 2, a(1) = 22.
a(n) = 2*A138894(n).
E.g.f.: (5*exp(9*x) - exp(x))/2. - G. C. Greubel, Feb 07 2021

A255044 Array A read by upward antidiagonals: A(n,k) = ((2*n+1)*9^k-1)/2, n,k >= 0.

Original entry on oeis.org

0, 1, 4, 2, 13, 40, 3, 22, 121, 364, 4, 31, 202, 1093, 3280, 5, 40, 283, 1822, 9841, 29524, 6, 49, 364, 2551, 16402, 88573, 265720, 7, 58, 445, 3280, 22963, 147622, 797161, 2391484, 8, 67, 526, 4009, 29524, 206671, 1328602, 7174453, 21523360
Offset: 0

Views

Author

L. Edson Jeffery, Feb 13 2015

Keywords

Examples

			Array begins:
.   0   4   40   364   3280   29524   265720   2391484   21523360
.   1  13  121  1093   9841   88573   797161   7174453   64570081
.   2  22  202  1822  16402  147622  1328602  11957422  107616802
.   3  31  283  2551  22963  206671  1860043  16740391  150663523
.   4  40  364  3280  29524  265720  2391484  21523360  193710244
.   5  49  445  4009  36085  324769  2922925  26306329  236756965
.   6  58  526  4738  42646  383818  3454366  31089298  279803686
.   7  67  607  5467  49207  442867  3985807  35872267  322850407
.   8  76  688  6196  55768  501916  4517248  40655236  365897128
		

Crossrefs

Cf. A191681, A096053, A255043, A198964, A198969 (rows 0-3 and 5).
Cf. A138894 (1/2 of row 2).

Programs

  • Mathematica
    (* Array: *)
    Grid[Table[((2*n + 1)*9^k - 1)/2, {n, 0, 8}, {k, 0, 8}]]
    (* Array antidiagonals flattened: *)
    Flatten[Table[((2*(n - k) + 1)*9^k - 1)/2, {n, 0, 8}, {k, 0, n}]]

Formula

G.f. for row n: (n+(4-n)*x)/((1-x)(1-9*x)).
Recurrence for row n: A(n,k) = 10*A(n,k-1)-9*A(n,k-2), k >= 2, A(n,0) = n, A(n,1) = 9*n+4.

A333813 a(n) = 2^(1 + floor(n*log_2(3))) - (3^n + 1).

Original entry on oeis.org

0, 0, 6, 4, 46, 12, 294, 1908, 1630, 13084, 6486, 84996, 517134, 502828, 3605638, 2428308, 24062142, 5077564, 149450422, 985222180, 808182894, 6719515980, 2978678758, 43295774644, 267326277406, 252223018332, 1856180682774, 1170495537220
Offset: 0

Views

Author

Ctibor O. Zizka, Apr 06 2020

Keywords

Comments

For integers X, Y, let a(n) = (X^(t+1) - 1) / (X - 1) - Y^n, where t = floor(n*log_X(Y)) . This sequence is for X = 2, Y = 3.

Examples

			a(0) = 2^(1 + floor(0*log_2(3))) - (3^0 + 1) = 0; a(4) = 2^(1 + floor(4*log_2(3))) - (3^4 + 1) = 46.
		

Crossrefs

Examples for integers X = Y from {2, 3, 4, 5, 6, 7, 8, 9, 10} are A000225, A003462, A002450, A003463, A003464, A023000, A023001, A002452, A002275. Examples for X = 2, Y = 4 are A024036; for X = 2, Y = 8, A024088; and for X = 3, Y = 9, A191681.

Programs

  • Mathematica
    Table[2^(1+Floor[n Log2[3]])-(3^n+1),{n,0,30}] (* Harvey P. Dale, Sep 04 2023 *)

Formula

a(n) = 2^(1 + floor(n*log_2(3))) - (3^n + 1).
Showing 1-6 of 6 results.