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

A075690 a(n) = (n-1)*(n-2)^4 - A028294(n), for n > 4, with a(1) = a(2) = 0, a(3) = 2, and a(4) = 48.

Original entry on oeis.org

0, 0, 2, 48, 304, 999, 2393, 4791, 8542, 14039, 21719, 32063, 45596, 62887, 84549, 111239, 143658, 182551, 228707, 282959, 346184, 419303, 503281, 599127, 707894, 830679, 968623, 1122911, 1294772, 1485479, 1696349, 1928743, 2184066, 2463767
Offset: 1

Views

Author

Jon Perry, Oct 12 2002

Keywords

Crossrefs

Cf. A028294.

Programs

  • Magma
    [0,0,2,48] cat [(11*n^4+19*n^3-632*n^2+2012*n-1686)/6: n in [4..50]]; // G. C. Greubel, Jan 03 2024
    
  • Mathematica
    LinearRecurrence[{5,-10,10,-5,1}, {0,0,2,48,304,999,2393,4791,8542}, 50] (* G. C. Greubel, Jan 03 2024 *)
  • SageMath
    [0,0,2,48] + [(11*n^4+19*n^3-632*n^2+2012*n-1686)/6 for n in range(4,51)] # G. C. Greubel, Jan 03 2024

Formula

From G. C. Greubel, Jan 03 2024: (Start)
a(n) = (n-1)*(n-2)^4 - A028294(n) + 46*[n=1] - 23*[n=2] - 9*[n=3] + [n=4].
a(n) = (11*n^4 + 19*n^3 - 632*n^2 + 2012*n - 1686)/6 + 46*[n=1] - 23*[n=2] - 9*[n=3] + [n=4].
G.f.: x^3*(2 + 38*x + 84*x^2 - 61*x^3 - 32*x^4 + 14*x^5 - x^6)/(1-x)^5.
E.g.f.: (1/6)*(-1686 + 1410*x - 498*x^2 + 85*x^3 + 11*x^4)*exp(x) + 281 + 46*x - 23*x^2/2 - 9*x^3/3! + x^4/4!. (End)

Extensions

More terms from David Wasserman, Jan 22 2005
Name clarified by G. C. Greubel, Jan 03 2024

A006368 The "amusical permutation" of the nonnegative numbers: a(2n)=3n, a(4n+1)=3n+1, a(4n-1)=3n-1.

Original entry on oeis.org

0, 1, 3, 2, 6, 4, 9, 5, 12, 7, 15, 8, 18, 10, 21, 11, 24, 13, 27, 14, 30, 16, 33, 17, 36, 19, 39, 20, 42, 22, 45, 23, 48, 25, 51, 26, 54, 28, 57, 29, 60, 31, 63, 32, 66, 34, 69, 35, 72, 37, 75, 38, 78, 40, 81, 41, 84, 43, 87, 44, 90, 46, 93, 47, 96, 49, 99, 50, 102, 52, 105, 53
Offset: 0

Views

Author

Keywords

Comments

A permutation of the nonnegative integers.
There is a famous open question concerning the closed trajectories under this map - see A217218, A028393, A028394, and Conway (2013).
This is lodumo_3 of A131743. - Philippe Deléham, Oct 24 2011
Multiples of 3 interspersed with numbers other than multiples of 3. - Harvey P. Dale, Dec 16 2011
For n>0: a(2n+1) is the smallest number missing from {a(0),...,a(2n-1)} and a(2n) = a(2n-1) + a(2n+1). - Bob Selcoe, May 24 2017
From Wolfdieter Lang, Sep 21 2021: (Start)
The permutation P of positive natural numbers with P(n) = a(n-1) + 1, for n >= 1, is the inverse of the permutation given in A265667, and it maps the index n of A178414 to the index of A047529: A178414(n) = A047529(P(n)).
Thus each number {1, 3, 7} (mod 8) appears in the first column A178414 of the array A178415 just once. For the formulas see below. (End)
Starting at n = 1, the sequence equals the smallest unused positive number such that a(n)-a(n-1) does not appear as a term in the current sequence. - Scott R. Shannon, Dec 20 2023

Examples

			9 is odd so a(9) = round(3*9/4) = round(7-1/4) = 7.
		

References

  • J. H. Conway, Unpredictable iterations, in Proc. Number Theory Conf., Boulder, CO, 1972, pp. 49-52.
  • R. K. Guy, Unsolved Problems in Number Theory, E17.
  • J. C. Lagarias, ed., The Ultimate Challenge: The 3x+1 Problem, Amer. Math. Soc., 2010; see page 5.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a006368 n | u' == 0   = 3 * u
              | otherwise = 3 * v + (v' + 1) `div` 2
              where (u,u') = divMod n 2; (v,v') = divMod n 4
    -- Reinhard Zumkeller, Apr 18 2012
    
  • Magma
    [n mod 2 eq 1 select Round(3*n/4) else 3*n/2: n in [0..80]]; // G. C. Greubel, Jan 03 2024
  • Maple
    f:=n-> if n mod 2 = 0 then 3*n/2 elif n mod 4 = 1 then (3*n+1)/4 else (3*n-1)/4; fi; # N. J. A. Sloane, Jan 21 2011
    A006368:=(1+3*z+z**2+3*z**3+z**4)/(1+z**2)/(z-1)**2/(1+z)**2; # [Conjectured (correctly, except for the offset) by Simon Plouffe in his 1992 dissertation.]
  • Mathematica
    Table[If[EvenQ[n],(3n)/2,Floor[(3n+2)/4]],{n,0,80}] (* or *) LinearRecurrence[ {0,1,0,1,0,-1},{0,1,3,2,6,4},80] (* Harvey P. Dale, Dec 16 2011 *)
  • PARI
    a(n)=(3*n+n%2)\(2+n%2*2)
    
  • PARI
    a(n)=if(n%2,round(3*n/4),3*n/2)
    
  • Python
    def a(n): return 0 if n == 0 else 3*n//2 if n%2 == 0 else (3*n+1)//4
    print([a(n) for n in range(72)]) # Michael S. Branicky, Aug 12 2021
    

Formula

If n even, then a(n) = 3*n/2, otherwise, a(n) = round(3*n/4).
G.f.: x*(1+3*x+x^2+3*x^3+x^4)/((1-x^2)*(1-x^4)). - Michael Somos, Jul 23 2002
a(n) = -a(-n).
From Reinhard Zumkeller, Nov 20 2009: (Start)
a(n) = A006369(n) - A168223(n).
A168221(n) = a(a(n)).
A168222(a(n)) = A006369(n). (End)
a(n) = a(n-2) + a(n-4) - a(n-6); a(0)=0, a(1)=1, a(2)=3, a(3)=2, a(4)=6, a(5)=4. - Harvey P. Dale, Dec 16 2011
From Wolfdieter Lang, Sep 21 2021: (Start)
Formulas for the permutation P(n) = a(n-1) + 1 mentioned above:
P(n) = n + floor(n/2) if n is odd, and n - floor(n/4) if n is even.
P(n) = (3*n-1)/2 if n is odd; P(n) = (3*n+2)/4 if n == 2 (mod 4); and P(n) = 3*n/4 if n == 0 (mod 4). (End)

Extensions

Edited by Michael Somos, Jul 23 2002
I replaced the definition with the original definition of Conway and Guy. - N. J. A. Sloane, Oct 03 2012

A003777 a(n) = n^3 + n^2 - 1.

Original entry on oeis.org

1, 11, 35, 79, 149, 251, 391, 575, 809, 1099, 1451, 1871, 2365, 2939, 3599, 4351, 5201, 6155, 7219, 8399, 9701, 11131, 12695, 14399, 16249, 18251, 20411, 22735, 25229, 27899, 30751, 33791, 37025, 40459, 44099, 47951, 52021, 56315, 60839, 65599, 70601, 75851
Offset: 1

Views

Author

N. J. A. Sloane, Jun 14 1998

Keywords

Comments

This sequence in related to A095794 by a(n) = n*A095794(n) - Sum_{i=1..n-1} A095794(i), for n > 1. - Bruno Berselli, Dec 28 2010
a(n) is the area of a triangle with vertices at points (n-1,(n-1)^2), (n,n^2), and ((n+1)^2,n+1). - J. M. Bergot, Jun 03 2014
Old name was: "Number of stacks of n pikelets, distance 3 flips from a well-ordered stack".

Crossrefs

Programs

Formula

G.f.: x*(1+7*x-3*x^2+x^3)/(1-x)^4. Also, a(n) = 2*A002411(n) - 1 = A000578(n-1) + A001107(n). - Bruno Berselli, Dec 28 2010
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n > 4. - Wesley Ivan Hurt, Oct 08 2017
E.g.f.: 1 + (-1 + 2*x + 4*x^2 + x^3)*exp(x). - G. C. Greubel, Jan 03 2024

Extensions

More terms from Wesley Ivan Hurt, Jun 04 2014
Entry revised by N. J. A. Sloane, Jun 15 2014

A028295 a(n) = n^6 - (883/60)*n^5 + (157/3)*n^4 + (2155/12)*n^3 - (4570/3)*n^2 + (42767/15)*n - 967.

Original entry on oeis.org

133, 1903, 10561, 38015, 106461, 252737, 533397, 1030505, 1858149, 3169675, 5165641, 8102491, 12301949, 18161133, 26163389, 36889845, 51031685, 69403143, 92955217, 122790103, 160176349, 206564729, 263604837, 333162401, 417337317, 518482403, 639222873
Offset: 6

Views

Author

Keywords

Comments

Old name was: "Number of stacks of n pikelets, distance 6 flips from a well-ordered stack".

Crossrefs

Programs

  • Magma
    [(60*n^6 -883*n^5 +3140*n^4 +10775*n^3 -91400*n^2 +171068*n -58020)/60: n in [6..46]]; // G. C. Greubel, Jan 03 2024
    
  • Mathematica
    (* Codes from Robert G. Wilson v, Jul 29 2018: Start *)
    a[n_]:= n^6 - (883/60)*n^5 + (157/3)*n^4 + (2155/12)*n^3 - (4570/3)*n^2 + (42767/15)*n - 967; Table[a[n], {n,6,36}]
    CoefficientList[ Series[x^6 (3x^6 -2x^5 -187x^4 +604x^3 -33x^2 -972x - 133)/(x-1)^7, {x,0,36}], x]
    LinearRecurrence[{7,-21,35,-35,21,-7,1}, {133,1903,10561,38015,106461, 252737,533397}, 36]
    (* End *)
  • SageMath
    [(60*n^6 -883*n^5 +3140*n^4 +10775*n^3 -91400*n^2 +171068*n -58020)/60 for n in range(6,47)] # G. C. Greubel, Jan 03 2024

Formula

G.f.: x^6*(133 + 972*x + 33*x^2 - 604*x^3 + 187*x^4 + 2*x^5 - 3*x^6) / (1-x)^7. - R. J. Mathar, Jun 21 2011
E.g.f.: (1/5!)*(116040 - 69480*x - 30540*x^2 - 2340*x^3 + 95*x^4 + 3*x^5 - (116040 - 185520*x + 96960*x^2 - 25880*x^3 + 3580*x^4 - 34*x^5 - 120*x^6)*exp(x)). - G. C. Greubel, Jan 03 2024

Extensions

Entry revised by N. J. A. Sloane, Jun 15 2014
a(17)-a(32) from Robert G. Wilson v, Jul 29 2018
Showing 1-4 of 4 results.