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 41-50 of 117 results. Next

A223576 T(n,k)=Number of nXk 0..2 arrays with antidiagonals unimodal.

Original entry on oeis.org

3, 9, 9, 27, 81, 27, 81, 729, 729, 81, 243, 6561, 16038, 6561, 243, 729, 59049, 352836, 352836, 59049, 729, 2187, 531441, 7762392, 16230456, 7762392, 531441, 2187, 6561, 4782969, 170772624, 746600976, 746600976, 170772624, 4782969, 6561, 19683
Offset: 1

Views

Author

R. H. Hardin Mar 22 2013

Keywords

Comments

Table starts
.....3..........9.............27.................81...................243
.....9.........81............729...............6561.................59049
....27........729..........16038.............352836...............7762392
....81.......6561.........352836...........16230456.............746600976
...243......59049........7762392..........746600976...........64207683936
...729.....531441......170772624........34343644896.........5521860818496
..2187....4782969.....3756997728......1579807665216.......474880030390656
..6561...43046721....82653950016.....72671152599936.....40839682613596416
.19683..387420489..1818386900352...3342873019597056...3512212704769291776
.59049.3486784401.40004511807744.153772158901464576.302050292610159092736

Examples

			Some solutions for n=3 k=4
..0..1..2..2....0..2..0..1....0..1..2..2....0..0..1..2....0..1..0..2
..0..1..2..2....1..1..2..0....1..1..0..1....1..2..1..2....0..2..1..0
..1..2..1..1....1..2..0..1....1..0..2..2....1..0..2..0....0..1..0..0
		

Crossrefs

Column 1 is A000244
Column 2 is A001019

Formula

Let U(z) = (z^4+6*z^3+23*z^2+18*z+24)/24
T(n,k) = U(min(n,k))^(max(n,k)-min(n,k)+1) * product{ U(i)^2 , i=1..(min(n,k)-1) }

A239014 Exponents m such that the decimal expansion of 9^m exhibits its first zero from the right later than any previous exponent.

Original entry on oeis.org

0, 2, 3, 4, 6, 7, 12, 13, 14, 17, 26, 34, 68, 406, 926, 2227, 3379, 3824, 26364, 197564, 9669757, 11470439, 15754533, 18945654, 25742286, 38175282, 237545304, 320907073, 2928221215, 3653563322, 5788579994, 25722005323, 30228962873, 137527721034, 217558664165, 523648850797
Offset: 1

Views

Author

Keywords

Comments

Assume that a zero precedes all decimal expansions. This will take care of those cases in A030705.
Inspired by the seqfan list discussion Re: "possible sequence", beginning with David Wilson 7:57 PM Mar 06 2014 and continued by M. F. Hasler, Allan C. Wechsler and Franklin T. Adams-Watters.
Not just two time A001019.

Crossrefs

Except for its second term, A030705 is a subsequence.

Programs

  • Mathematica
    f[n_] := Position[ Reverse@ Join[{0}, IntegerDigits[ PowerMod[9, n, 10^500]]], 0, 1, 1][[1, 1]]; k = mx = 0; lst = {}; While[k < 10000001, c = f[k]; If[c > mx, mx = c; AppendTo[ lst, k]; Print@ k]; k++]; lst

Extensions

a(27)-a(31) from Bert Dobbelaere, Jan 21 2019
a(32)-a(36) from Chai Wah Wu, Jan 13 2020

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

Original entry on oeis.org

0, 3, 79, 1323, 18175, 223323, 2555119, 27828363, 292407775, 2990349243, 29943991759, 294872615403, 2864776362175, 27525734996763, 262061152909999, 2475899571994443, 23240879960425375, 216963121865909883, 2015960236625789839, 18656492902684557483, 172056837889322101375
Offset: 1

Views

Author

Stefano Spezia, Nov 11 2023

Keywords

Comments

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

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{24,-191,504},{0,3,79},21]

Formula

a(n) = 17*9^(n-1) - 31*8^(n-1) + 2*7^n.
a(n) = 24*a(n-1) - 191*a(n-2) + 504*a(n-3) for n > 3.
O.g.f.: x^2*(3 + 7*x)/((1 - 7*x)*(1 - 8*x)*(1 - 9*x)).
E.g.f.: (136*exp(9*x) - 279*exp(8*x) + 144*exp(7*x) - 1)/72.

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

Original entry on oeis.org

0, 1, 35, 703, 11231, 158311, 2062655, 25466743, 302423471, 3487593511, 39314599775, 435241463383, 4748453693711, 51186327429511, 546278900354495, 5781325731101623, 60750456603203951, 634502309615150311, 6592506388026870815, 68188442304165981463, 702543059232886986191
Offset: 1

Views

Author

Stefano Spezia, Nov 11 2023

Keywords

Comments

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

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{27,-242,720},{0,1,35},21]

Formula

a(n) = 9*10^(n-1) - 17*9^(n-1) + 8^n.
a(n) = 27*a(n-1) - 242*a(n-2) + 720*a(n-3) for n > 3.
O.g.f.: x^2*(1 + 8*x)/((1 - 8*x)*(1 - 9*x)*(1 - 10*x)).
E.g.f.: (81*exp(10*x) - 170*exp(9*x) + 90*exp(8*x) - 1)/90.

A213652 9-nomial coefficient array: Coefficients of the polynomial (1+...+X^8)^n, n=0,1,...

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 3, 6, 10, 15, 21, 28, 36, 45, 52, 57, 60, 61, 60, 57, 52, 45, 36, 28, 21, 15, 10, 6, 3, 1, 1, 4, 10, 20, 35, 56, 84, 120, 165, 216, 270, 324, 375, 420, 456, 480, 489, 480, 456
Offset: 0

Views

Author

M. F. Hasler, Jun 17 2012

Keywords

Comments

The n-th row also yields the number of ways to get a total of n, n+1,..., 9n, when summing n integers ranging from 1 to 9.
The row sums equal 9^n = A001019(n).
The row lengths are 1+8n = A017077(n).

Examples

			The triangle starts:
(row n=0) 1; (row sum = 1, row length = 1)
(row n=1) 1,1,1,1,1,1,1,1,1; (row sum = 9, row length = 9)
(row n=2) 1,2,3,4,5,6,7,8,9,8,7,6,5,4,3,2,1; (sum = 81, length = 17)
(row n=3) 1,3,6,10,15,21,28,36,45,52,57,60,61,60,... (sum = 729, length = 25)
(row n=4) 1, 4, 10, 20, 35, 56, 84, 120, 165, 216, 270, 324, 375, 420, 456,... (sum = 9^4; length = 33),
etc.
		

Crossrefs

The q-nomial arrays are for q=2..10: A007318 (Pascal), A027907, A008287, A035343, A063260, A063265, A171890, A213652, A213651.

Programs

  • Maple
    #Define the r-nomial coefficients for r = 1, 2, 3, ...
    rnomial := (r,n,k) -> add((-1)^i*binomial(n,i)*binomial(n+k-1-r*i,n-1), i = 0..floor(k/r)):
    #Display the 9-nomials as a table
    r := 9:  rows := 10:
    for n from 0 to rows do
    seq(rnomial(r,n,k), k = 0..(r-1)*n)
    end do; # Peter Bala, Sep 07 2013
  • PARI
    concat(vector(5,k,Vec(sum(j=0,8,x^j)^(k-1))))

Formula

T(n,k) = Sum_{i=0..floor(k/9)} (-1)^i*binomial(n,i)*binomial(n+k-1-9*i,n-1) for n >= 0 and 0 <= k <= 8*n. - Peter Bala, Sep 07 2013

A055260 Sums of two powers of 9.

Original entry on oeis.org

2, 10, 18, 82, 90, 162, 730, 738, 810, 1458, 6562, 6570, 6642, 7290, 13122, 59050, 59058, 59130, 59778, 65610, 118098, 531442, 531450, 531522, 532170, 538002, 590490, 1062882, 4782970, 4782978, 4783050, 4783698, 4789530, 4842018, 5314410, 9565938, 43046722
Offset: 0

Views

Author

Henry Bottomley, Jun 22 2000

Keywords

Crossrefs

Programs

  • Mathematica
    t = 9^Range[0, 9]; Select[Union[Flatten[Table[i + j, {i, t}, {j, t}]]], # <= t[[-1]] + 1 &] (* T. D. Noe, Oct 09 2011 *)
    Total/@Tuples[9^Range[0,10],2]//Union (* Harvey P. Dale, Jul 03 2019 *)
  • Python
    def valuation(n, b):
      v = 0
      while n > 1: n //= b; v += 1
      return v
    def aupto(lim):
      pows = [9**i for i in range(valuation(lim-1, 9) + 1)]
      sum_pows = sorted([a+b for i, a in enumerate(pows) for b in pows[i:]])
      return [s for s in sum_pows if s <= lim]
    print(aupto(43046722)) # Michael S. Branicky, Feb 10 2021
    
  • Python
    from math import isqrt
    def A055260(n): return 9**(a:=(k:=isqrt(m:=n<<1))+(m>k*(k+1))-1)+9**(n-1-(a*(a+1)>>1)) # Chai Wah Wu, Apr 09 2025

Formula

a(n) = 9^(n-trinv(n))+9^trinv(n), where trinv(n) = floor((1+sqrt(1+8*n))/2) = A002262(n) and n-trinv(n) = A003056(n)
Regarded as a triangle T(n, k) = 9^n + 9^k, so as a sequence a(n) = 9^A002262(n) + 9^A003056(n).

A127796 a(n) = nextprime(9^n) - 9^n.

Original entry on oeis.org

1, 2, 2, 4, 2, 2, 16, 2, 26, 10, 8, 4, 2, 2, 26, 4, 70, 34, 2, 8, 118, 4, 8, 68, 56, 28, 50, 28, 62, 158, 16, 122, 92, 28, 20, 110, 140, 70, 28, 44, 20, 124, 316, 38, 8, 44, 136, 58, 110, 2, 148, 170, 116, 170, 40, 2, 182, 10, 46, 254, 56, 14, 8, 2, 190, 148, 382, 10, 56, 10
Offset: 0

Views

Author

Artur Jasinski, Jan 29 2007

Keywords

Crossrefs

Programs

  • Mathematica
    << NumberTheory`NumberTheoryFunctions` a = {}; Do[k = NextPrime[9^x] - 9^x; AppendTo[a, k], {x, 0, 100}]; a

Formula

a(n) = A013632(A001019(n)). - Michel Marcus, Nov 18 2019

A211866 (9^n - 5) / 4.

Original entry on oeis.org

1, 19, 181, 1639, 14761, 132859, 1195741, 10761679, 96855121, 871696099, 7845264901, 70607384119, 635466457081, 5719198113739, 51472783023661, 463255047212959, 4169295424916641, 37523658824249779, 337712929418248021, 3039416364764232199, 27354747282878089801
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 12 2013

Keywords

Comments

(2*n, a(n)) are the solutions of Diophantine equation 3^x = 4*y + 5.
Second bisection of A080926. - Bruno Berselli, Feb 12 2013
Sum of n-th row of triangle of powers of 9: 1; 9 1 9; 81 9 1 9 81; 729 81 9 1 9 81 729; ... - Philippe Deléham, Feb 24 2014

Examples

			a(1) = 1;
a(2) = 9 + 1 + 9 = 19;
a(3) = 81 + 9 + 1 + 9 + 81 = 181;
a(4) = 729 + 81 + 9 + 1 + 9 + 81 + 729 = 1639; etc. - _Philippe Deléham_, Feb 24 2014
		

References

  • Jiri Herman, Radan Kucera and Jaromir Simsa, Equations and Inequalities, Springer (2000), p. 225 (5.3).

Crossrefs

Programs

Formula

G.f.: x*(1+9*x)/((1-x)*(1-9*x)). - Bruno Berselli, Feb 12 2013
a(n)-a(n-1) = A000792(6n-4). - Bruno Berselli, Feb 12 2013
a(n) = 9*a(n-1) + 10, a(1) = 1. - Philippe Deléham, Feb 24 2014
a(n) = -A084222(2*n). - Philippe Deléham, Feb 24 2014

A217999 T(n,k)=Number of nXk arrays of the minimum or maximum value of corresponding elements and their horizontal and vertical neighbors in a random 0..2 nXk array.

Original entry on oeis.org

3, 9, 9, 25, 81, 25, 81, 729, 729, 81, 241, 6561, 19665, 6561, 241, 719, 59049, 531143, 531143, 59049, 719, 2181, 531441, 14345273, 43046713, 14345273, 531441, 2181, 6543, 4782969, 387332417, 3486751263, 3486751263, 387332417, 4782969, 6543
Offset: 1

Views

Author

R. H. Hardin Oct 17 2012

Keywords

Comments

Table starts
.....3........9..........25...........81..........241..........719
.....9.......81.........729.........6561........59049.......531441
....25......729.......19665.......531143.....14345273....387332417
....81.....6561......531143.....43046713...3486751263.282429513233
...241....59049....14345273...3486751263.847279307713
...719...531441...387332417.282429513233
..2181..4782969.10458051407
..6543.43046721
.19623

Examples

			Some solutions for n=3 k=4
..0..2..2..0....0..2..2..2....0..2..1..1....0..0..0..2....0..1..0..2
..1..0..2..0....0..2..0..0....1..2..0..1....0..1..1..0....0..0..1..2
..1..0..0..0....0..2..2..0....1..1..0..1....2..2..0..0....2..0..2..1
		

Crossrefs

Column 2 is 9^n, A001019

A308656 Number of ways to write n as (2^a*9^b)^2 + c*(2c+1) + d*(3d+1), where a and b are nonnegative integers, and c and d are integers.

Original entry on oeis.org

1, 1, 1, 3, 2, 3, 3, 2, 3, 1, 4, 2, 1, 4, 3, 4, 3, 5, 4, 3, 6, 2, 2, 4, 3, 6, 2, 4, 5, 3, 6, 4, 4, 4, 4, 4, 4, 1, 4, 5, 5, 2, 3, 3, 2, 8, 3, 4, 5, 3, 5, 3, 3, 5, 3, 7, 1, 3, 5, 4, 6, 3, 6, 2, 2, 6, 5, 4, 6, 6, 7, 3, 4, 9, 5, 4, 5, 3, 4, 4, 11, 5, 5, 12, 5, 7, 5, 4, 10, 2, 7, 8, 4, 8, 7, 12, 5, 5, 5, 5
Offset: 1

Views

Author

Zhi-Wei Sun, Jun 14 2019

Keywords

Comments

Note that {x*(2x+1): x is an integer} = {n*(n+1)/2: n = 0,1,2,...}.
Conjecture 1: a(n) > 0 for all n > 0.
Conjecture 2: If f(x) is one of the polynomials x*(4x+1), x*(5x+2), x*(5x+4), x*(7x+3)/2 and x(7x+5)/2, then any positive integer n can be written as (2^a*9^b)^2 + f(c) + d*(3d+1)/2, where a and b are nonnegative integers, and c and d are integers.
Conjecture 3: Let r be 1 or 2. Then any positive integer n can be written as (2^a*7^b)^2 + c*(2c+1) + d*(3d+r), where a and b are nonnegative integers, and c and d are integers.
Conjecture 4: If g(x) is one of the polynomials x*(x+1), x*(4x+3), x*(7x+1)/2, x*(7x+3)/2 and x*(7x+5)/2, then any positive integer n can be written as (2^a*7^b)^2 + g(c) + d*(3d+1)/2, where a and b are nonnegative integers, and c and d are integers.
We have verified a(n) > 0 for all n = 1..10^8, and Conjectures 2-4 for all n = 1..10^6.
See also A308640, A308641, and A308644 for similar conjectures.
Jiao-Min Lin (a student at Nanjing University) has found a counterexample to Conjecture 1: a(2109982225) = 0. - Zhi-Wei Sun, Jul 30 2022

Examples

			a(13) = 1 with 13 = (2^0*9^0)^2 + 2*(2*2+1) + (-1)*(3*(-1)+1).
a(3515) = 1 with 3515 = (2^0*9^1)^2 + 0*(2*0+1) + (-34)*(3*(-34)+1).
a(124076) = 1 with 124076 = (2^3*9^1)^2 + 206*(2*206+1) + 106*(3*106+1).
a(141518) = 1 with 141518 = (2^1*9^2)^2 + (-188)*(2*(-188)+1) + 122*(3*122+1).
a(345402) = 1 with 345402 = (2^7*9^0)^2 + 18*(2*18+1) + (-331)*(3*(-331)+1).
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=PQ[n]=IntegerQ[Sqrt[12n+1]];
    tab={};Do[r=0;Do[If[PQ[n-81^a*4^b-x(2x+1)],r=r+1],{a,0,Log[81,n]},{b,0,Log[4,n/81^a]},{x,-Floor[(Sqrt[8(n-81^a*4^b)+1]+1)/4],(Sqrt[8(n-81^a*4^b)+1]-1)/4}];tab=Append[tab,r],{n,1,100}];Print[tab]
Previous Showing 41-50 of 117 results. Next