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

A183121 Magnetic Tower of Hanoi, total number of moves, generated by a certain algorithm, yielding a "forward moving" non-optimal solution of the [RED ; NEUTRAL ; NEUTRAL] or [NEUTRAL ; NEUTRAL ; BLUE] pre-colored puzzle.

Original entry on oeis.org

0, 1, 4, 11, 30, 85, 244, 715, 2118, 6317, 18900, 56635, 169822, 509365, 1527972, 4583771, 13751142, 41253229, 123759460, 371278123, 1113834078, 3341501909, 10024505364, 30073515691, 90220546630, 270661639405, 811984917684, 2435954752475, 7307864256798, 21923592769717, 65770778308420, 197312334924475
Offset: 0

Views

Author

Uri Levy, Jan 05 2011

Keywords

Comments

The Magnetic Tower of Hanoi puzzle is described in link 1 listed below. The Magnetic Tower is pre-colored. Pre-coloring is [RED ; NEUTRAL ; NEUTRAL] or [NEUTRAL ; NEUTRAL ; BLUE], given in [Source ; Intermediate ; Destination] order. The solution algorithm producing the presented sequence is NOT optimal. The particular "64" algorithm solving the puzzle at hand is not explicitly presented in any of the referenced papers. The series and its properties are listed in the paper referenced by link 2 listed below. For the optimal solution of the Magnetic Tower of Hanoi puzzle with the given pre-coloring configuration see A183115 and A183116. Optimal solutions are discussed and their optimality is proved in link 2 listed below.
Large N limit of the sequence is 0.5*(23/36)*3^N =~ 0.5*0.64*3^N. Series designation: S64(n).

References

  • U. Levy, The Magnetic Tower of Hanoi, Journal of Recreational Mathematics, Volume 35 Number 3 (2006), 2010, pp 173.

Crossrefs

A183120 - is an "original" sequence describing the number of moves of disk number k, solving the pre-colored puzzle at hand when executing the "64" algorithm mentioned above.
A104743 - is a sequence also describing the total number of moves, generated by another algorithm, designated "67", yielding a "forward moving" non-optimal solution of the [RED ; NEUTRAL ; NEUTRAL] or [NEUTRAL ; NEUTRAL ; BLUE] pre-colored puzzle at hand. Recurrence relations for this sequence is a(n) = a(n-1) + 2*3^(n-2) + 1 and the closed-form expression is 3^(n-1) + n - 1. Large N limit is 0.5*(2/3)*3^N =~ 0.5*0.67*3^N, and sequence designation is thus S67(n). The (non-optimal) "67" algorithm solving the Magnetic Tower of Hanoi with the given pre-coloring configuration yielding the S67(n) sequence (given by A104743) is explicitly described and discussed in the paper referenced in link 1 above.
A003462 "Partial sums of A000244" is the sequence (also) describing the total number of moves solving [RED ; BLUE ; BLUE] or [RED ; RED ; BLUE] pre-colored Magnetic Tower of Hanoi puzzle.

Programs

  • Magma
    I:=[0,1,4,11,30,85,244]; [n le 7 select I[n] else 5*Self(n-1)-6*Self(n-2)-2*Self(n-3)+7*Self(n-4)-3*Self(n-5): n in [1..35]]; // Vincenzo Librandi, Dec 04 2018
    
  • Maple
    seq(coeff(series(x*(1-x-3*x^2+x^3+2*x^4-4*x^5)/((1+x)*(1-3*x)*(1-x)^3)), x,n+1), x, n), n = 0 .. 35); # Muniru A Asiru, Dec 04 2018
  • Mathematica
    Join[{0, 1}, LinearRecurrence[{5, -6, -2, 7, -3}, {4, 11, 30, 85, 244}, 30]] (* Jean-François Alcover, Dec 04 2018 *)
    CoefficientList[Series[x*(1-x-3*x^2+x^3+2*x^4-4*x^5)/((1+x)*(1-3*x)*(1-x)^3), {x, 0, 33}], x] (* Vincenzo Librandi, Dec 04 2018 *)
  • PARI
    my(x='x+O('x^30)); concat([0], Vec(x*(1-x-3*x^2+x^3+2*x^4-4*x^5)/ ((1+x)*(1-3*x)*(1-x)^3))) \\ G. C. Greubel, Dec 04 2018
    
  • Sage
    s=(x*(1-x-3*x^2+x^3+2*x^4-4*x^5)/((1+x)*(1-3*x)*(1-x)^3) ).series(x, 30); s.coefficients(x, sparse=False) # G. C. Greubel, Dec 04 2018

Formula

G.f.: x*(1-x-3*x^2+x^3+2*x^4-4*x^5)/((1+x)*(1-3*x)*(1-x)^3).
(a(n) = S64(n) as in referenced paper):
a(n) = 3*a(n-1) - n^2 + 6*n - 11; n even; n >= 4.
a(n) = 3*a(n-1) - n^2 + 6*n - 10; n odd; n >= 3.
a(n) = a(n-1) + 2* S75(n-3) + 5*3^(n-3) + 2; n >= 3
S75(n) refers to the integer sequence described by A183119.
a(n) = 0.5*(23/36)*3^n + 0.5*n^2 - 1.5*n + 17/8; n even; n >= 2.
a(n) = 0.5*(23/36)*3^n + 0.5*n^2 - 1.5*n + 19/8; n odd; n >= 3.
a(n) = 5*a(n-1)-6*a(n-2)-2*a(n-3)+7*a(n-4)-3*a(n-5), for n>5. - Vincenzo Librandi, Dec 04 2018

Extensions

More terms from Jean-François Alcover, Dec 04 2018

A183123 Magnetic Tower of Hanoi, total number of moves, generated by a certain algorithm, yielding a "forward moving" non-optimal solution of the [NEUTRAL ; NEUTRAL ; NEUTRAL] pre-colored puzzle.

Original entry on oeis.org

0, 1, 4, 11, 30, 83, 236, 691, 2050, 6123, 18336, 54971, 164870, 494563, 1483636, 4450851, 13352490, 40057403, 120172136, 360516331, 1081548910, 3244646643, 9733939836, 29201819411, 87605458130, 262816374283, 788449122736, 2365347368091, 7096042104150
Offset: 0

Views

Author

Uri Levy, Jan 07 2011

Keywords

Comments

The Magnetic Tower of Hanoi puzzle is described in link 1 listed below. The Magnetic Tower is pre-colored. Pre-coloring is [NEUTRAL ; NEUTRAL ; NEUTRAL], given in [Source ; Intermediate ; Destination] order. The solution algorithm producing the presented sequence is NOT optimal. The particular "62" algorithm solving the puzzle at hand is presented and discussed in the paper referenced by link 1 below. For the optimal solution of the Magnetic Tower of Hanoi puzzle with the given pre-coloring configuration (the "natural" or "free" Magnetic Tower) see A183117 and A183118. Optimal solutions are discussed and their optimality is proved in link 2 listed below.
Large N limit of the sequence is 0.5*(67/108)*3^N ~ 0.5*0.62*3^N. Series designation: S62(n).

References

  • U. Levy, The Magnetic Tower of Hanoi, Journal of Recreational Mathematics, Volume 35 Number 3 (2006), 2010, pp 173.

Crossrefs

Cf. A183122 - "Magnetic Tower of Hanoi, number of moves of disk number k, generated by a certain algorithm, yielding a "forward moving" non-optimal solution of the [NEUTRAL ; NEUTRAL ; NEUTRAL] pre-colored puzzle" is an "original" sequence describing the number of moves of disk number k, solving the pre-colored puzzle at hand when executing the "62" algorithm mentioned above.
Cf. A003462 "Partial sums of A000244" is the sequence (also) describing the total number of moves solving [RED ; BLUE ; BLUE] or [RED ; RED ; BLUE] pre-colored Magnetic Tower of Hanoi puzzle. A183111 through A183125 are related sequences, all associated with various solutions of the pre-coloring variations of the Magnetic Tower of Hanoi.

Programs

  • Mathematica
    LinearRecurrence[{4,-2,-4,3},{0,1,4,11,30,83,236},40] (* Harvey P. Dale, Jun 07 2015 *)
  • PARI
    concat(0, Vec(x*(4*x^5+2*x^4+2*x^3+3*x^2-1)/((x-1)^2*(x+1)*(3*x-1)) + O(x^100))) \\ Colin Barker, Sep 18 2014

Formula

a(n)=+4*a(n-1)-2*a(n-2)-4*a(n-3)+3*a(n-4) for n>6.
(a(n) = S62(n) as in referenced paper):
S62(n) = 3*S62(n-1) - 5*n + 17; n even; n >= 4
S62(n) = 3*S62(n-1) - 5*n + 13; n odd; n >= 5
S62(n) = S67(n-1) + S67(n-2) + S75(n-3) + 4*3^(n-3) + 2; n >= 3
S67(n) and S75(n) refer to the integer sequences described by A104743 and A183119 respectively.
S62(n) = 0.5*(67/108)*3^n + 2.5*n - 41/8; n even; n >= 4
S62(n) = 0.5*(67/108)*3^n + 2.5*n - 39/8; n odd; n >= 3.
a(n) = -5-(-1)^n/8+(67*3^(-3+n))/8+(5*n)/2 for n>2. - Colin Barker, Sep 18 2014
G.f.: x*(4*x^5+2*x^4+2*x^3+3*x^2-1) / ((x-1)^2*(x+1)*(3*x-1)). - Colin Barker, Sep 18 2014

Extensions

More terms and correction to recurrence by Colin Barker, Sep 18 2014

A251701 a(n) = 3^n + n^2.

Original entry on oeis.org

1, 4, 13, 36, 97, 268, 765, 2236, 6625, 19764, 59149, 177268, 531585, 1594492, 4783165, 14349132, 43046977, 129140452, 387420813, 1162261828, 3486784801, 10460353644, 31381060093, 94143179356, 282429537057, 847288610068, 2541865829005, 7625597485716
Offset: 0

Views

Author

Vincenzo Librandi, Dec 07 2014

Keywords

Crossrefs

Programs

  • Magma
    [3^n+n^2: n in [0..30]];
    
  • Magma
    I:=[1,4,13,36]; [n le 4 select I[n] else 6*Self(n-1)-12*Self(n-2)+10*Self(n-3)-3*Self(n-4): n in [1..30]];
  • Maple
    A251701:=n->3^n + n^2: seq(A251701(n), n=0..40); # Wesley Ivan Hurt, Jan 22 2017
  • Mathematica
    Table[3^n + n^2, {n, 0, 40}] (* or *) CoefficientList[Series[(1 - 2 x + x^2 - 4 x^3) / ((1 - 3 x) (1 - x)^3), {x, 0, 40}], x]
    LinearRecurrence[{6,-12,10,-3},{1,4,13,36},30] (* Harvey P. Dale, Aug 08 2017 *)

Formula

G.f.: (1-2*x+x^2-4*x^3)/((1-3*x)*(1-x)^3).
a(n) = 6*a(n-1)-12*a(n-2)+10*a(n-3)-3*a(n-4) for n>3.
a(n) = A000244(n) + A000290(n).

A273942 Primes of the form 3^k + k.

Original entry on oeis.org

11, 6569, 16677181699666603
Offset: 1

Views

Author

Vincenzo Librandi, Jun 06 2016

Keywords

Comments

Terms given correspond to k in A057900.
a(4) has 731 digits.

Crossrefs

Programs

  • Magma
    [a: n in [0..100] | IsPrime(a) where a is 3^n+n];
  • Mathematica
    Select[Table[3^n + n, {n, 1, 1000}], PrimeQ]

Formula

a(n) = A104743(A057900(n)). - Amiram Eldar, Jul 27 2025

A337455 Numbers of the form m + bigomega(m) with m a positive integer.

Original entry on oeis.org

1, 3, 4, 6, 8, 11, 12, 14, 15, 16, 17, 18, 20, 21, 23, 24, 27, 28, 30, 31, 32, 33, 35, 36, 37, 38, 40, 41, 42, 44, 45, 47, 48, 51, 53, 54, 55, 57, 58, 59, 60, 62, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 81, 84, 85, 87, 88, 89, 90, 92, 93
Offset: 1

Views

Author

Nathan J. McDougall, Aug 27 2020

Keywords

Comments

If a(n) = m + A001222(m) then (a(n) - m) <= log(a(n))/log(2).
It appears that a(n)/n may converge to a constant around ~ 1.49.

Examples

			a(7) = 10 + A001222(10) = 10 + 2 = 12
		

Crossrefs

Cf. A001222 (bigomega), A064800, A358973.
Numbers of the form k^n+n where k is prime are subsequences: A006127 (k=2), A104743 (k=3), A104745 (k=5), A226199 (k=7), A226737 (k=11).
Subsequences include A008864, A101340, and A160649 (excluding the first term).

Programs

  • Mathematica
    m = 100; Select[Union @ Table[n + PrimeOmega[n], {n, 1, m}], # <= m &] (* Amiram Eldar, Aug 28 2020 *)
  • PARI
    upto(limit)=Set(select(t->t<=limit, apply(m->m+bigomega(m), [1..limit]))) \\ Andrew Howroyd, Aug 27 2020
    
  • PARI
    list(lim)=my(v=List()); forfactored(n=1, lim\1-1, my(t=n[1]+bigomega(n)); if(t<=lim, listput(v, t))); Set(v) \\ Charles R Greathouse IV, Dec 07 2022

Formula

Kucheriaviy proves that a(n) << n log log n and conjectures that a(n) ≍ n, that is, these numbers have positive lower density. - Charles R Greathouse IV, Dec 07 2022

A370658 Numbers k such that (3^k + 3*k)/3 is prime.

Original entry on oeis.org

1, 2, 4, 16, 46, 118, 160, 3740, 3778, 9704, 10624, 21460
Offset: 1

Views

Author

Hugo Pfoertner, Feb 27 2024

Keywords

Comments

If it exists, a(13) > 75000.

Crossrefs

Previous Showing 11-16 of 16 results.