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

A047240 Numbers that are congruent to {0, 1, 2} mod 6.

Original entry on oeis.org

0, 1, 2, 6, 7, 8, 12, 13, 14, 18, 19, 20, 24, 25, 26, 30, 31, 32, 36, 37, 38, 42, 43, 44, 48, 49, 50, 54, 55, 56, 60, 61, 62, 66, 67, 68, 72, 73, 74, 78, 79, 80, 84, 85, 86, 90, 91, 92, 96, 97, 98, 102, 103, 104, 108, 109, 110, 114, 115, 116, 120, 121, 122
Offset: 1

Views

Author

Keywords

Comments

Partial sums of 0,1,1,4,1,1,4,... - Paul Barry, Feb 19 2007
Numbers k such that floor(k/3) = 2*floor(k/6). - Bruno Berselli, Oct 05 2017

Crossrefs

Cf. similar sequences with formula n+i*floor(n/3) listed in A281899.

Programs

Formula

From Paul Barry, Feb 19 2007: (Start)
G.f.: x*(1 + x + 4*x^2)/((1 - x)*(1 - x^3)).
a(n) = 2*n - 3 - cos(2*n*Pi/3) + sin(2*n*Pi/3)/sqrt(3). (End)
a(n) = n-1 + 3*floor((n-1)/3). - Philippe Deléham, Apr 21 2009
a(n) = 6*floor(n/3) + (n mod 3). - Gary Detlefs, Mar 09 2010
a(n+1) = Sum_{k>=0} A030341(n,k)*b(k) with b(0)=1 and b(k)=2*3^k for k>0. - Philippe Deléham, Oct 22 2011.
a(n) = 2*n - 2 - A010872(n-1). - Wesley Ivan Hurt, Jul 07 2013
From Wesley Ivan Hurt, Jun 14 2016: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(3*k) = 6*k-4, a(3*k-1) = 6*k-5, a(3*k-2) = 6*k-6. (End)
Sum_{n>=2} (-1)^n/a(n) = (3-sqrt(3))*Pi/18 + log(2+sqrt(3))/(2*sqrt(3)). - Amiram Eldar, Dec 14 2021
E.g.f.: 4 + exp(x)*(2*x - 3) - exp(-x/2)*(3*cos(sqrt(3)*x/2) - sqrt(3)*sin(sqrt(3)*x/2))/3. - Stefano Spezia, Jul 26 2024

Extensions

Paul Barry formula adapted for offset 1 by Wesley Ivan Hurt, Jun 14 2016

A234904 a(n)*Pi is the total length of irregular spiral (center points: 2, 1, 3) after n rotations.

Original entry on oeis.org

3, 12, 18, 21, 30, 36, 39, 48, 54, 57, 66, 72, 75, 84, 90, 93, 102, 108, 111, 120, 126, 129, 138, 144, 147, 156, 162, 165, 174, 180, 183, 192, 198, 201, 210, 216, 219, 228, 234, 237, 246, 252, 255, 264, 270, 273, 282, 288, 291, 300, 306, 309, 318, 324, 327, 336, 342, 345, 354, 360, 363, 372, 378, 381, 390, 396, 399, 408
Offset: 1

Views

Author

Kival Ngaokrajang, Jan 01 2014

Keywords

Comments

Let points 2, 1 & 3 be placed on a straight line at intervals of 1 unit. At point 1 make a half unit circle then at point 2 make another half circle and maintain continuity of circumferences. Continue using this procedure at points 3, 1, 2, and so on. The form of spiral is non-expanded loop. See illustration in links.

Crossrefs

Cf. A014105*Pi (total spiral length, 2 inline center points).

Programs

  • Magma
    I:=[3,12,18,21]; [n le 4 select I[n] else Self(n-1)+Self(n-3)-Self(n-4): n in [1..70]]; // Vincenzo Librandi, May 10 2015
  • Mathematica
    RecurrenceTable[{a[n] == a[n - 1] + a[n - 3] - a[n - 4], a[1] == 3,
    a[2] == 12, a[3] == 18, a[4] == 21}, a, {n, 1, 68}] (* Michael De Vlieger, May 09 2015 *)
    LinearRecurrence[{1, 0, 1, -1}, {3, 12, 18, 21}, 70] (* Vincenzo Librandi, May 10 2015 *)
  • PARI
    Vec(3*x*(x+1)*(2*x+1)/((x-1)^2*(x^2+x+1)) + O(x^100)) \\ Colin Barker, Jul 12 2014
    

Formula

a(n) = 3*A047234(n+1).
From Colin Barker, Jul 12 2014: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4).
G.f.: 3*x*(x+1)*(2*x+1) / ((x-1)^2*(x^2+x+1)). (End)
Interlaced polynomials: a(3n) = 18*n; a(3n+1) = 18*n+3; a(3n+2) = 18*n + 12 for n > 0. - Avi Friedlich, May 16 2015

A047242 Numbers that are congruent to {0, 1, 3} mod 6.

Original entry on oeis.org

0, 1, 3, 6, 7, 9, 12, 13, 15, 18, 19, 21, 24, 25, 27, 30, 31, 33, 36, 37, 39, 42, 43, 45, 48, 49, 51, 54, 55, 57, 60, 61, 63, 66, 67, 69, 72, 73, 75, 78, 79, 81, 84, 85, 87, 90, 91, 93, 96, 97, 99, 102, 103, 105, 108, 109, 111, 114, 115, 117, 120, 121, 123
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A047261 (complement).

Programs

Formula

Equals partial sums of (0, 1, 2, 3, 1, 2, 3, 1, 2, 3, ...). - Gary W. Adamson, Jun 19 2008
G.f.: x^2*(1+2*x+3*x^2)/((1+x+x^2)*(x-1)^2). - R. J. Mathar, Oct 08 2011
A214090(a(n)) = 0. - Reinhard Zumkeller, Jul 06 2012
a(n) = a(n-1) + a(n-3) - a(n-4), n>4. - Wesley Ivan Hurt, Dec 03 2014
a(n) = n-1 + floor((n-1)/3) + floor((2n-2)/3). - Wesley Ivan Hurt, Dec 03 2014
From Wesley Ivan Hurt, Jun 13 2016: (Start)
a(n) = (6*n-8-cos(2*n*Pi/3)+sqrt(3)*sin(2*n*Pi/3))/3.
a(3k) = 6k-3, a(3k-1) = 6k-5, a(3k-2) = 6k-6. (End)
a(n) = 2*n - 2 - sign((n-1) mod 3). - Wesley Ivan Hurt, Sep 26 2017
Sum_{n>=2} (-1)^n/a(n) = Pi/12 + log(2)/6 + log(2+sqrt(3))/(2*sqrt(3)). - Amiram Eldar, Dec 14 2021
E.g.f.: (9 + exp(x)*(6*x - 8) - exp(-x/2)*(cos(sqrt(3)*x/2) - sqrt(3)*sin(sqrt(3)*x/2)))/3. - Stefano Spezia, Jul 26 2024

A240438 Greatest minimal difference between numbers of adjacent cells in a regular hexagonal honeycomb of order n with cells numbered from 1 through the total number of cells, the order n corresponding to the number of cells on one side of the honeycomb.

Original entry on oeis.org

0, 1, 5, 11, 18, 28, 40, 53, 69, 87, 106, 128, 152, 177, 205, 235, 266, 300, 336, 373, 413, 455, 498, 544, 592, 641, 693, 747, 802, 860, 920, 981, 1045, 1111, 1178, 1248, 1320, 1393, 1469, 1547, 1626, 1708, 1792, 1877, 1965, 2055, 2146, 2240, 2336, 2433, 2533, 2635
Offset: 1

Views

Author

Jörg Zurkirchen, Apr 05 2014

Keywords

Comments

Difference table of a(n), with a(0)=0 and offset=0:
0, 0, 1, 5, 11, 18, 28, 40, 53, 69, ...
0, 1, 4, 6, 7, 10, 12, 13, 16, 18, ... = A047234(n+1)
1, 3, 2, 1, 3, 2, 1, 3, 2, 1, ... = A130784
2, -1, -1, 2, -1, -1, 2, -1, -1, 2, ... = -A131713(n+1)
-3, 0, 3, -3, 0, 3, -3, 0, 3, -3; ... = A099838(n+4)
3, 3, -6, 3, 3, -6, 3, 3, -6, 3, ...
0, -9, 9, 0, -9, 9, 0, -9, 9, 0, ...
-9, 18, -9, -9, 18, -9, -9, 18, -9, -9, ...
First column: see A057682. - Paul Curtz, Nov 11 2014
Diameter of the chamber graph Γ(Alt(2n+1)). Definition of this graph:
Each vertex v is a sequence (v[1],v[2],...,v[n]) of length n, where each v[i] is a 2-subset of {1,2,...,2n+1} and v[i] and v[j] are disjoint unless i=j.
Vertices u and v are connected iff either:
u and v are identical except for their first elements u[1] and v[1], or
u and v are identical except for some i for which u[i]=v[i+1] and v[i]=u[i+1] - Tim Crinion, 17 Feb 2019

Examples

			For n = 3 an example of a honeycomb with the greatest minimal difference of a(3) = 5 is:
.         __
.      __/ 7\__
.   __/15\__/13\__
.  / 4\__/ 2\__/ 1\
.  \__/10\__/ 8\__/
.  /18\__/16\__/14\
.  \__/ 5\__/ 3\__/
.  /12\__/11\__/ 9\
.  \__/19\__/17\__/
.     \__/ 6\__/
.        \__/
.
		

References

  • 22ème Championnat des jeux mathématiques et logiques - 1/4 de finale individuels 2008, problème 18, «Les ruches d’Abella»

Crossrefs

Programs

  • Magma
    [n*(n-1)-Floor((n+1)/3): n in [1..60]]; // Vincenzo Librandi, Nov 12 2014
  • Maple
    A240438:=n->n*(n-1)-floor((n+1)/3); seq(A240438(n), n=1..50); # Wesley Ivan Hurt, Apr 08 2014
  • Mathematica
    Table[n (n - 1) - Floor[(n + 1)/3], {n, 50}] (* Wesley Ivan Hurt, Apr 08 2014 *)
    CoefficientList[Series[x (x + 1) (2 x + 1) / ((1 - x)^3 (x^2 + x + 1)), {x, 0, 60}], x] (* Vincenzo Librandi, Nov 12 2014 *)
    LinearRecurrence[{2, -1, 1, -2, 1},{0, 1, 5, 11, 18},52] (* Ray Chandler, Sep 24 2015 *)

Formula

a(n) = n*(n-1)-floor((n+1)/3).
G.f.: -x^2*(x+1)*(2*x+1) / ((x-1)^3*(x^2+x+1)). - Colin Barker, Apr 08 2014
a(n+3) = a(n) + 6*n+5. - Paul Curtz, Nov 11 2014
a(n) = n^2 - (A042965(n+1)=0, 1, 3, 4, ...). - Paul Curtz, Nov 11 2014
a(n+1) = a(n) + A047234(n+1). - Paul Curtz, Nov 11 2014

A262397 a(n) = floor(A261327(n)/9).

Original entry on oeis.org

0, 0, 0, 1, 0, 3, 1, 5, 1, 9, 2, 13, 4, 19, 5, 25, 7, 32, 9, 40, 11, 49, 13, 59, 16, 69, 18, 81, 21, 93, 25, 107, 28, 121, 32, 136, 36, 152, 40, 169, 44, 187, 49, 205, 53, 225, 58, 245, 64, 267, 69, 289, 75, 312, 81, 336, 87, 361, 93, 387, 100, 413, 106, 441
Offset: 0

Views

Author

Paul Curtz, Sep 21 2015

Keywords

Comments

Hexasections:
0, 1, 4, 9, 16, 25, 36, ... = A000290(n)
0, 5, 19, 40, 69, 107, 152, ... = c(n)
0, 1, 5, 11, 18, 28, 40, ... = d(n+1)
1, 9, 25, 49, 81, 121, 169, ... = A016754(n)
0, 2, 7, 13, 21, 32, 44, ... = A240438(n+1)
3, 13, 32, 59, 93, 136, 187, ... = e(n+1).
The six sequences have the signature (2, -1, 1, -2, 1), that is, the signature of a(n) without the 0's.
It appears that d(n+1) and A240438(n+1) are connected via the following scheme.
Let x(n) be the sequence that concatenates terms of d(n+1) in reverse order with terms of A240438(n+1), both without their index_0 term:
..., 18, 11, 5, 1, 0, 0, 2, 7, 13, 21, 32, ...
And consider the first and second differences of this sequence:
..., -7, -6, -4, -1, 0, 2, 5, 6, 8, 11, 12, ...
..., 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, ...
In the first differences, we get A047234(n+1) and A047267(n+1). And in the second differences, we get A010882(n).
In the same way, c(n) and e(n+1) are connected via the first and second differences of this sequence, with both their index_0 term:
..., 69, 40, 19, 5, 0, 3, 13, 32, 59, ...
that are respectively:
..., -29, -21, -14, -5, 3, 10, 19, 27, 34, ...
..., 8, 7, 9, 8, 7, 9, 8, 7, 9, ... .
Is it possible to find a direct definition for a(n)?

Examples

			a(0) = floor(1/9) = 0, a(1)= floor (5/9) = 0, a(2) = floor(2/9) = 0, a(3)= floor (13/9) = 1.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0, 3, 0, -3, 0, 1}, {1, 5, 2, 13, 5, 29}, 70]/9 // Floor (* Jean-François Alcover, Sep 26 2015, after Vincenzo Librandi in A261327 *)
  • PARI
    a(n) = numerator((n^2+4)/4)\9; \\ Michel Marcus, Sep 22 2015
    
  • PARI
    concat([0,0,0], Vec(-x^3*(x^4 +x^3 +x^2 +x +1)*(x^12 -x^11 +x^10 -x^8 +2*x^6 -x^4 +x^2 -x +1) / ((x -1)^3*(x +1)^3*(x^2 -x +1)*(x^2 +x +1)*(x^6 -x^3 +1)*(x^6 +x^3 +1)) + O(x^100))) \\ Colin Barker, Sep 25 2015
    
  • PARI
    a(n)=if(n%2,n^2+4,(n/2)^2+1)\9 \\ Charles R Greathouse IV, Oct 16 2015

Formula

a(n) = (A261327(n) - A261327(n) mod 9)/9.
From Colin Barker, Sep 25 2015: (Start)
a(n) = floor((n^2+4)/36) for n even.
a(n) = floor((n^2+4)/9) for n odd.
G.f.: -x^3*(x^4 +x^3 +x^2 +x +1)*(x^12 -x^11 +x^10 -x^8 +2*x^6 -x^4 +x^2 -x +1) / ((x -1)^3*(x +1)^3*(x^2 -x +1)*(x^2 +x +1)*(x^6 -x^3 +1)*(x^6 +x^3 +1)). (End)

Extensions

New name suggested by Michel Marcus, Sep 22 2015

A262523 a(n+3) = a(n) + 6*n + 13, a(0)=0, a(1)=2, a(2)=7.

Original entry on oeis.org

0, 2, 7, 13, 21, 32, 44, 58, 75, 93, 113, 136, 160, 186, 215, 245, 277, 312, 348, 386, 427, 469, 513, 560, 608, 658, 711, 765, 821, 880, 940, 1002, 1067, 1133, 1201, 1272, 1344, 1418, 1495, 1573, 1653, 1736, 1820, 1906, 1995, 2085, 2177, 2272, 2368, 2466
Offset: 0

Views

Author

Paul Curtz, Sep 24 2015

Keywords

Comments

Companion of A240438 extended from right to left:
..., 21, 13, 7, 2, 0, 0, 1, 5, 11, 18, ...
..., -8, -6, -5, -2, 0, 1, 4, 6, 7, 10, ... see A047267 and A047234
..., 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, ... .
The last digit of a(n) is of period 30. Like A240438.
Is there a definition equivalent to the NAME of A240438?

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{2, -1, 1, -2, 1}, {0, 2, 7, 13, 21}, 101] (* Ray Chandler, Sep 24 2015 *)
    RecurrenceTable[{a[n+3] == a[n] + 6 n + 13, a[0]==0, a[1]==2, a[2]==7}, a, {n, 0, 500}] (* G. C. Greubel, Sep 28 2015 *)
    Table[n (n + 1) + Floor[(n + 1)/3], {n, 0, 50}] (* Bruno Berselli, Jun 06 2017 *)
  • PARI
    concat(0, Vec(-x*(x+1)*(x+2)/ ((x-1)^3*(x^2+x+1)) + O(x^100))) \\ Colin Barker, Sep 25 2015
    
  • PARI
    A262523(n)=(2+[9,3]*n=divrem(n,6))*4*n[1]+[0,2,7,13,21,32][n[2]+1] \\ M. F. Hasler, Jun 06 2017

Formula

a(n) = A000290(n+1) - A004523(n+2).
a(n) = A240438(n+1) + A004523(n+1).
a(n) = A240438(n) + A047395(n+1).
a(n+2) - 2*a(n+1) + a(n) = period 3: repeat (3, 1, 2).
a(n+3) = a(n-3) + 4*(2 + 3*n). [Thus, a(n+3m) = a(n-3m) + 4m*(2 + 3n), and a(6m+k) = 4m*(9m + 3k + 2) + a(k): explicit formula for a(n) in terms of a(k), 0 <= k <= 5. - M. F. Hasler, Jun 06 2017]
O.g.f.: -x*(x+1)*(x+2) / ((x-1)^3*(x^2+x+1)). - Colin Barker, Sep 25 2015
E.g.f.: (x/3)*(3*x+7)*exp(x) - (2/(3*sqrt(3)))*exp(-x/2)*sin((sqrt(3)*x)/2). - G. C. Greubel, Sep 28 2015
(a(n+3) - a(n)) mod 2 = 1; (a(n+6) - a(n)) mod 2 = 0. - Altug Alkan, Sep 28 2015
(a(n) mod 2) = (0, 0, 1, 1, 1, 0) repeated. (a(n) mod 3) = (0, 2, 1, 1, 0, 2, 2, 1, 0) repeated. (a(n) mod 4) = (0, 2, 3, 1, 1, 0) repeated. (a(n) mod m) has a period of length 3*m, but for m = 4, 8, 12, ... also of length 3*m/2. - M. F. Hasler, Jun 06 2017
a(n) = n*(n+1) + floor((n+1)/3). - Bruno Berselli, Jun 06 2017

A152652 Least prime p with digit sum A047235(n).

Original entry on oeis.org

2, 13, 17, 19, 59, 79, 389, 499, 1889, 1999, 6899, 17989, 39989, 49999, 98999, 199999, 599999, 799999, 2999999, 4999999, 9899999, 19999999, 59999999, 189997999, 389999999, 689899999, 998999999, 2999899999, 6999999989, 9899989999, 39899999999, 68899999999, 98999999999
Offset: 1

Views

Author

Giovanni Teofilatto, Dec 10 2008

Keywords

Crossrefs

Cf. A111380 (smallest prime whose digital sum is equal to the n-th composite number not congruent to 0 (modulo 3)). - Klaus Brockhaus, Dec 12 2008

Programs

  • Magma
    T:=[ n eq 1 select 2 else Self(n-1)+2*(1+n mod 2): n in [1..22] ]; S:=[]; p:=2; for k in T do while &+Intseq(p, 10) ne k do p:=NextPrime(p); end while; Append(~S,p); end for; S; // Klaus Brockhaus, Dec 13 2008
    
  • PARI
    a(n) = {n = (n-1)\2*6+3+(-1)^n ; t = ceil(n/9); leastfound = oo; while(leastfound == oo, my(p = partitions(n, [1,9], [t,t])); v = vector(#p, i, oo); for(i = 1, #p, if(fromdigits(Vec(p[i])) > leastfound, next(2)); forperm(Vec(p[i]), q, if(isprime(fromdigits(Vec(q))), leastfound = min(leastfound, fromdigits(Vec(q))); v[i] = min(v[i], fromdigits(Vec(q))); next(2); ) ) ); t++ ); leastfound }\\ David A. Corneth, Jun 13 2020

Formula

{min A000040(i): A007605(i) = A047234(n)}. - R. J. Mathar, Dec 12 2008

Extensions

Edited and extended by R. J. Mathar, Dec 12 2008
a(20)-a(22) from Klaus Brockhaus, Dec 13 2008
More terms from Jinyuan Wang, Jun 13 2020

A308378 Numbers k such that phi(2k+1) = phi(2k+2).

Original entry on oeis.org

0, 1, 7, 127, 247, 487, 1312, 1627, 1852, 2593, 5857, 6682, 9157, 11467, 12772, 23107, 24607, 24667, 28822, 32767, 82087, 92317, 99157, 107887, 143497, 153697, 159637, 194122, 198742, 207637, 245767, 284407, 294703, 343492, 420127
Offset: 1

Views

Author

Torlach Rush, May 24 2019

Keywords

Comments

For n > 0, 2*a(n) + 1 is a term of A020884. This is because 2*a(n) + 1 is odd and every odd number is the difference of the squares of two consecutive numbers and hence are coprime.
For n > 0, (2*a(n) + 1) * (2*a(n) + 2) is a term of A024364. This is because (2*a(n) + 1) * (2*a(n) + 2) = 2*((a(n) + 1)^2 + (a(n) + 1) * a(n)) and gcd((a(n) + 1), a(n)) = 1.
For n > 0, a(n) is congruent to 1 or 4 mod 6.
2*a(n) + 1 is congruent to 1 or 3 mod 6 and is a term of A047241.
2*a(n) + 2 is congruent to 2 or 4 mod 6 and is a term of A047235.

Examples

			0 is a term because phi(1) = phi(2) = 1.
1 is a term because phi(3) = phi(4) = 2.
7 is a term because phi(15) = phi(16) = 8.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 9999], EulerPhi[2# + 1] == EulerPhi[2# + 2] &] (* Alonso del Arte, Jul 05 2019 *)
    Select[(#-1)/2&/@SequencePosition[EulerPhi[Range[900000]],{x_,x_}][[All,1]],IntegerQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 24 2019 *)
  • PARI
    lista(nn) = for(n=0, nn, if(eulerphi(2*n+1) == eulerphi(2*n+2), print1(n, ", ")));
    lista(430000)

Formula

a(n) = (A299535(n) - 2) / 2.
Showing 1-8 of 8 results.