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 81-90 of 180 results. Next

A367247 a(n) is the number of n-digit numbers whose difference between the largest and smallest digits is equal to 6.

Original entry on oeis.org

0, 7, 131, 1609, 16415, 150817, 1296191, 10641169, 84520175, 654958177, 4980233951, 37312922929, 276288797135, 2026564724737, 14750977566911, 106695818055889, 767748717541295, 5500729672814497, 39270143125479071, 279511731951144049, 1984459091985376655, 14059238393314971457
Offset: 1

Views

Author

Stefano Spezia, Nov 11 2023

Keywords

Comments

a(n) is the number of n-digit numbers in A366963.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{18,-107,210},{0,7,131},22]

Formula

a(n) = 27*7^(n-1) - 47*6^(n-1) + 4*5^n.
a(n) = 21*a(n-1) - 146*a(n-2) + 336*a(n-3) for n > 3.
O.g.f.: x^2*(7 + 5*x)/((1 - 5*x)*(1 - 6*x)*(1 - 7*x)).
E.g.f.: (162*exp(7*x) - 329*exp(6*x) + 168*exp(5*x) - 1)/42.

A367248 a(n) is the number of n-digit numbers whose difference between the largest and smallest digits is equal to 7.

Original entry on oeis.org

0, 5, 111, 1601, 19095, 204545, 2045511, 19508081, 179752215, 1613908385, 14202967911, 123028446161, 1052237271735, 8907026785025, 74758478722311, 623053865857841, 5162154289325655, 42558224511290465, 349394287423788711, 2858263098464575121, 23311522539676521975
Offset: 1

Views

Author

Stefano Spezia, Nov 11 2023

Keywords

Comments

a(n) is the number of n-digit numbers in A366964.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{21,-146,336},{0,5,111},21]

Formula

a(n) = 23*8^(n-1) - 41*7^(n-1) + 3*6^n.
a(n) = 21*a(n-1) - 146*a(n-2) + 336*a(n-3) for n > 3.
O.g.f.: x^2*(5 + 6*x)/((1 - 6*x)*(1 - 7*x)*(1 - 8*x)).
E.g.f.: (161*exp(8*x) - 328*exp(7*x) + 168*exp(6*x) - 1)/56.

A047852 a(n) = A047848(4, n).

Original entry on oeis.org

1, 2, 9, 58, 401, 2802, 19609, 137258, 960801, 6725602, 47079209, 329554458, 2306881201, 16148168402, 113037178809, 791260251658, 5538821761601, 38771752331202, 271402266318409, 1899815864228858, 13298711049602001, 93090977347214002, 651636841430498009, 4561457890013486058
Offset: 0

Views

Author

Keywords

Comments

n-th difference of a(n), a(n-1), ..., a(0) is A000400(n-1) for n >= 1.

Crossrefs

Programs

  • Magma
    [(7^n +5)/6: n in [0..40]]; // G. C. Greubel, Jan 12 2025
    
  • Maple
    a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=7*a[n-1]+1 od: seq(a[n]+1, n=0..19); # Zerinvary Lajos, Mar 20 2008
  • Mathematica
    (7^Range[0,40] +5)/6 (* G. C. Greubel, Jan 12 2025 *)
  • Python
    def A047852(n): return (pow(7, n) + 5)//6
    print([A047852(n) for n in range(41)]) # G. C. Greubel, Jan 12 2025

Formula

a(n) = (7^n + 5)/6. - Ralf Stephan, Feb 14 2004
From Philippe Deléham, Oct 06 2009: (Start)
a(0) = 1, a(1) = 2, a(n) = 8*a(n-1) - 7*a(n-2) for n > 1.
G.f.: (1 - 6*x)/(1 - 8*x + 7*x^2). (End)
a(n) = 7*a(n-1) - 5, with a(0)=1. - Vincenzo Librandi, Aug 06 2010
E.g.f.: exp(x)*(exp(6*x) + 5)/6. - Elmo R. Oliveira, Aug 29 2024

Extensions

a(20)-a(23) from Elmo R. Oliveira, Aug 29 2024

A056547 a(n) = 6*n*a(n-1) + 1 with a(0)=1.

Original entry on oeis.org

1, 7, 85, 1531, 36745, 1102351, 39684637, 1666754755, 80004228241, 4320228325015, 259213699500901, 17108104167059467, 1231783500028281625, 96079113002205966751, 8070645492185301207085, 726358094296677108637651
Offset: 0

Views

Author

Henry Bottomley, Jun 20 2000

Keywords

Examples

			a(2) = 6*2*a(1) + 1 = 12*7 + 1 = 85.
		

Crossrefs

Cf. A000522, A010844, A010845, A056545, A056546 for analogs. A056547/(A000142*A000400) is an increasingly good approximation to 6th root of e.

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,6a(n+1)+1}; NestList[nxt,{0,1},20][[;;,2]] (* Harvey P. Dale, Jul 17 2024 *)

Formula

a(n) = floor(e^(1/6)*6^n*n!).
a(n) = n!*Sum_{k=0..n} 6^(n-k)/k!. E.g.f.: exp(x)/(1 - 6*x). - Philippe Deléham, Mar 14 2004
From Peter Bala, Mar 01 2017: (Start)
a(n) = Integral_{x = 0..inf} (6*x + 1)^n*exp(-x) dx.
The e.g.f. y = exp(x)/(1 - 6*x) satisfies the differential equation (1 - 6*x)*y' = (7 - 6*x)*y.
a(n) = (6*n + 1)*a(n-1) - 6*(n - 1)*a(n-2).
The sequence b(n) := 6^n*n! also satisfies the same recurrence with b(0) = 1, b(1) = 6. This leads to the continued fraction representation a(n) = 6^n*n!*( 1 + 1/(6 - 6/(13 - 12/(19 - ... - (6*n - 6)/(6*n + 1) )))) for n >= 2. Taking the limit gives the continued fraction representation exp(1/6) = 1 + 1/(6 - 6/(13 - 12/(19 - ... - (6*n - 6)/((6*n + 1) - ... )))). Cf. A010844. (End)

Extensions

More terms from James Sellers, Jul 04 2000

A084608 Triangle, read by rows, where the n-th row lists the (2n+1) coefficients of (1+2*x+3*x^2)^n.

Original entry on oeis.org

1, 1, 2, 3, 1, 4, 10, 12, 9, 1, 6, 21, 44, 63, 54, 27, 1, 8, 36, 104, 214, 312, 324, 216, 81, 1, 10, 55, 200, 530, 1052, 1590, 1800, 1485, 810, 243, 1, 12, 78, 340, 1095, 2712, 5284, 8136, 9855, 9180, 6318, 2916, 729, 1, 14, 105, 532, 2009, 5922, 13993, 26840, 41979
Offset: 0

Views

Author

Paul D. Hanna, Jun 01 2003

Keywords

Examples

			Triangle begins:
  1;
  1,  2,  3;
  1,  4, 10,  12,   9;
  1,  6, 21,  44,  63,   54,   27;
  1,  8, 36, 104, 214,  312,  324,  216,   81;
  1, 10, 55, 200, 530, 1052, 1590, 1800, 1485, 810, 243;
		

Crossrefs

Programs

  • Haskell
    a084608 n = a084608_list !! n
    a084608_list = concat $ iterate ([1,2,3] *) [1]
    instance Num a => Num [a] where
       fromInteger k = [fromInteger k]
       (p:ps) + (q:qs) = p + q : ps + qs
       ps + qs         = ps ++ qs
       (p:ps) * qs'@(q:qs) = p * q : ps * qs' + [p] * qs
        *                = []
    -- Reinhard Zumkeller, Apr 02 2011
    
  • Magma
    A084608:= func< n,k | (&+[Binomial(n, k-j)*Binomial(k-j, j)*2^(k-2*j)*3^j: j in [0..k]]) >;
    [A084608(n,k): k in [0..2*n], n in [0..13]]; // G. C. Greubel, Mar 27 2023
    
  • Maple
    f:= proc(n) option remember; expand((1+2*x+3*x^2)^n) end:
    T:= (n,k)-> coeff(f(n), x, k):
    seq(seq(T(n, k), k=0..2*n), n=0..10);  # Alois P. Heinz, Apr 03 2011
  • Mathematica
    row[n_] := (1+2x+3x^2)^n + O[x]^(2n+1) // CoefficientList[#, x]&; Table[row[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Feb 01 2017 *)
  • PARI
    for(n=0,10, for(k=0,2*n,t=polcoeff((1+2*x+3*x^2)^n,k,x); print1(t",")); print(" "))
    
  • SageMath
    def A084608(n,k): return sum(binomial(n,j)*binomial(n-j,k-2*j)*2^(k-2*j)*3^j for j in range(k//2+1))
    flatten([[A084608(n,k) for k in range(2*n+1)] for n in range(14)]) # G. C. Greubel, Mar 27 2023

Formula

From G. C. Greubel, Mar 27 2023: (Start)
T(n, k) = Sum_{j=0..k} binomial(n, k-j)*binomial(k-j, j)*2^(k-2*j)*3^j.
T(n, n) = A084609(n).
T(n, 2*n-1) = A212697(n), n >= 1.
T(n, 2*n) = A000244(n).
Sum_{j=0..2*n} T(n, k) = A000400(n).
Sum_{k=0..2*n} (-1)^k*T(n, k) = A000079(n).
Sum_{k=0..n} T(n-k, k) = A101822(n). (End)

A100309 Modulo 2 binomial transform of 6^n.

Original entry on oeis.org

1, 7, 37, 259, 1297, 9079, 47989, 335923, 1679617, 11757319, 62145829, 435020803, 2178463249, 15249242743, 80603140213, 564221981491, 2821109907457, 19747769352199, 104381066575909, 730667466031363, 3658979549971729
Offset: 0

Views

Author

Paul Barry, Dec 06 2004

Keywords

Comments

6^n may be retrieved through 6^n = Sum_{k=0..n} (-1)^A010060(n-k) * mod(binomial(n,k), 2) * a(k).

Crossrefs

Programs

  • Magma
    [(&+[6^k*(Binomial(n,k) mod 2): k in [0..n]]): n in [0..40]]; // G. C. Greubel, Feb 02 2023
    
  • Mathematica
    a[n_]:= a[n]= Sum[6^k*Mod[Binomial[n,k], 2], {k,0,n}];
    Table[a[n], {n,0,40}] (* G. C. Greubel, Feb 02 2023 *)
  • Python
    def A100309(n): return sum((bool(~n&n-k)^1)*6**k for k in range(n+1)) # Chai Wah Wu, May 03 2023
  • SageMath
    def A100309(n): return sum(6^k*(binomial(n, k)%2) for k in range(n+1))
    [A100309(n) for n in range(41)] # G. C. Greubel, Feb 02 2023
    

Formula

a(n) = Sum_{k=0..n} mod(binomial(n, k), 2) * 6^k.
From Vladimir Shevelev, Dec 26-27 2013: (Start)
Sum_{n>=0} 1/a(n)^r = Product_{k>=0} (1 + 1/(6^(2^k)+1)^r),
Sum_{n>=0} (-1)^A000120(n)/a(n)^r = Product_{k>=0} (1 - 1/(6^(2^k)+1)^r), where r>0 is a real number.
In particular,
Sum_{n>=0} 1/a(n) = Product_{k>=0} (1 + 1/(6^(2^k)+1)) = 1.1746508...;
Sum_{n>=0} (-1)^A000120(n)/a(n) = 5/6.
a(2^n) = 6^(2^n) + 1, n>=0.
Note that analogs of Stephan's limit formulas (see Shevelev link) reduce to the relations a(2^t*n+2^(t-1)) = 35*(6^(2^(t-1)+1))/(6^(2^(t-1))-1) * a(2^t*n+2^(t-1)-2), t>=2. In particular, for t=2,3,4, we have the following formulas:
a(4*n+2) = 37 * a(4*n);
a(8*n+4) = 1297/37 * a(8*n+2);
a(16*n+8)= 1679617/47989 * a(16*n+6), etc. (End)

A109354 a(n) = 6^((n^2 - n)/2).

Original entry on oeis.org

1, 1, 6, 216, 46656, 60466176, 470184984576, 21936950640377856, 6140942214464815497216, 10314424798490535546171949056, 103945637534048876111514866313854976, 6285195213566005335561053533150026217291776, 2280250319867037997421842330085227917956272625811456
Offset: 0

Views

Author

Philippe Deléham, Aug 25 2005

Keywords

Comments

Sequence given by the Hankel transform (see A001906 for definition) of A078018 = {1, 1, 7, 55, 469, 4237, 39907, 387739, ...}; example: det([1, 1, 7, 55; 1, 7, 55, 469; 7, 55, 469, 4237; 55, 469, 4237, 39907]) = 6^6 = 46656.
In general, sequences of the form m^((n^2 - n)/2) enumerate the graphs with n labeled nodes with m types of edge. a(n) therefore is the number of labeled graphs with n nodes with 6 types of edge. - Mark Stander, Apr 11 2019

Crossrefs

Programs

  • Mathematica
    Table[6^((n^2-n)/2),{n,0,10}] (* Harvey P. Dale, May 28 2013 *)
  • PARI
    a(n) = 6^((n^2 - n)/2); \\ Michel Marcus, Apr 12 2019

Formula

a(n+1) is the determinant of n X n matrix M_(i, j) = binomial(6i, j).
G.f. A(x) satisfies: A(x) = 1 + x * A(6*x). - Ilya Gutkovskiy, Jun 04 2020

Extensions

Terms a(11) and beyond from Andrew Howroyd, Jan 02 2020

A160869 a(n) = sigma(6^(n-1)).

Original entry on oeis.org

1, 12, 91, 600, 3751, 22932, 138811, 836400, 5028751, 30203052, 181308931, 1088123400, 6529545751, 39179682372, 235085301451, 1410533397600, 8463265086751, 50779784492892, 304679288612371, 1828077476115000, 10968470088963751, 65810836228506612
Offset: 1

Views

Author

N. J. A. Sloane, Nov 15 2009

Keywords

Crossrefs

Row 6 of array in A160870.

Programs

  • Magma
    [(2^n-1)*(3^n-1)/2: n in [1..50]]; // G. C. Greubel, Apr 30 2018
  • Mathematica
    Table[(2^n-1)*(3^n-1)/2,{n,40}] (* Vladimir Joseph Stephan Orlovsky, Apr 28 2010 *)
    LinearRecurrence[{12,-47,72,-36}, {1, 12, 91, 600}, 50] (* G. C. Greubel, Apr 30 2018 *)
  • PARI
    Vec(-x*(6*x^2-1)/((x-1)*(2*x-1)*(3*x-1)*(6*x-1)) + O(x^100)) \\ Colin Barker, Nov 24 2014
    
  • PARI
    for(n=1, 50, print1((2^n-1)*(3^n-1)/2, ", ")) \\ G. C. Greubel, Apr 30 2018
    

Formula

a(n) = A059387(n)/2. - Vladimir Joseph Stephan Orlovsky, Apr 28 2010
a(n) = 12*a(n-1)-47*a(n-2)+72*a(n-3)-36*a(n-4). - Colin Barker, Nov 24 2014
G.f.: -x*(6*x^2-1) / ((x-1)*(2*x-1)*(3*x-1)*(6*x-1)). - Colin Barker, Nov 24 2014
a(n) = A000203(A000400(n-1)). - Michel Marcus, Sep 18 2018

Extensions

More terms from Vladimir Joseph Stephan Orlovsky, Apr 28 2010
More terms from Colin Barker, Nov 24 2014
Better definition from Altug Alkan, Oct 06 2015

A175434 (Digit sum of 2^n) mod n.

Original entry on oeis.org

0, 0, 2, 3, 0, 4, 4, 5, 8, 7, 3, 7, 7, 8, 11, 9, 14, 1, 10, 11, 5, 3, 18, 13, 4, 14, 8, 15, 12, 7, 16, 26, 29, 27, 24, 28, 19, 29, 32, 21, 9, 4, 13, 14, 17, 24, 21, 25, 16, 26, 29, 27, 24, 28, 37, 29, 23, 12, 18, 22, 13, 23, 26, 24, 21, 43, 43, 35, 20, 0, 15, 37, 37, 56, 50, 30, 27, 22, 31, 32, 26, 42, 39, 34, 43, 26, 20, 27, 24, 28, 55, 47, 32, 57, 45, 31, 40, 14, 8, 15
Offset: 1

Views

Author

N. J. A. Sloane, Dec 03 2010

Keywords

Examples

			For n = 1,2,3,4,5,6, the digit-sum of 2^n is 2,4,8,7,5,10, so
a(1) through a(6) are 0,0,2,3,0,4. - _N. J. A. Sloane_, Aug 12 2014
		

Crossrefs

Sum of digits of k^n mod n: (k=2) A000079, A001370, A175434, A175169; (k=3) A000244, A004166, A175435, A067862; (k=5) A000351, A066001, A175456; (k=6) A000400, A066002, A175457, A067864; (k=7) A000420, A066003, A175512, A067863; (k=8) A062933; (k=13) A001022, A175527, A175528, A175525; (k=21) A175589; (k=167) A175558, A175559, A175560, A175552.

Programs

  • Mathematica
    Table[Mod[Total[IntegerDigits[2^n]],n],{n,100}] (* Harvey P. Dale, Aug 12 2014 *)

Extensions

Offset changed to 1 at the suggestion of Harvey P. Dale, Aug 12 2014

A240840 Floor(6^n/(1+1/(2*cos(5*Pi/11)))^n).

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 5, 7, 9, 12, 17, 22, 30, 40, 53, 71, 95, 126, 168, 223, 297, 395, 525, 698, 928, 1234, 1640, 2180, 2899, 3854, 5123, 6811, 9055, 12038, 16003, 21275, 28282, 37599, 49984, 66448, 88336, 117433, 156115
Offset: 0

Views

Author

Kival Ngaokrajang, Apr 13 2014

Keywords

Comments

a(n) is the perimeter (rounded down) of a hendecaflake after n iterations, let a(0) = 1. The total number of sides is 11*A000400(n). The total number of holes is A016123(n), n >=1. 1/(2*cos(5*Pi/11)) = A231186.

Crossrefs

Cf. A000400, A016123, A231186, A240523 (pentaflake), A240671 (heptaflake), A240572 (octaflake), A240733 (nonaflake), A240734 (decaflake), A240735 (dodecaflake), A240841 (tridecaflake).

Programs

  • Maple
    A240840:=n->floor(6^n/(1+1/(2*cos(5*Pi/11)))^n); seq(A240840(n), n=0..50); # Wesley Ivan Hurt, Apr 13 2014
  • Mathematica
    Table[Floor[6^n/(1 + 1/(2*Cos[5*Pi/11]))^n], {n, 0, 50}] (* Wesley Ivan Hurt, Apr 13 2014 *)
  • PARI
    {a(n)=floor(6^n/(1+1/(2*cos(5*Pi/11)))^n)}
           for (n=0, 100, print1(a(n), ", "))
Previous Showing 81-90 of 180 results. Next