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

A363938 Lexicographically earliest sequence of numbers in a hexagonal spiral such that their neighbors have no common prime factor.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 8, 17, 15, 19, 12, 23, 25, 29, 10, 31, 14, 27, 16, 21, 37, 33, 26, 41, 22, 35, 43, 47, 18, 49, 24, 53, 39, 20, 51, 55, 28, 59, 61, 32, 45, 34, 67, 57, 40, 63, 71, 36, 65, 38, 73, 79, 30, 83, 77, 46, 89, 69, 91, 58, 81, 85, 87
Offset: 1

Views

Author

Carole Dubois, Jun 29 2023

Keywords

Examples

			a(11) = 8 because the neighbors of the 11th hexagon are 3, 13, 17, 21, 33, 37, which do not have any common prime divisor with 8.
		

Crossrefs

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

Original entry on oeis.org

1, 3, 47, 259, 861, 2171, 4603, 8667, 14969, 24211, 37191, 54803, 78037, 107979, 145811, 192811, 250353, 319907, 403039, 501411, 616781, 751003, 906027, 1083899, 1286761, 1516851, 1776503, 2068147, 2394309, 2757611, 3160771
Offset: 0

Views

Author

Mohammad K. Azarian, Jul 26 2007

Keywords

Crossrefs

Programs

  • Mathematica
    Table[4n^4-3n^3+2n^2-n+1,{n,0,30}] (* or *) LinearRecurrence[{5,-10,10,-5,1},{1,3,47,259,861},40] (* Harvey P. Dale, May 27 2017 *)
  • PARI
    a(n)=4*n^4-3*n^3+2*n^2-n+1 \\ Charles R Greathouse IV, Oct 21 2022

A267942 Interleave (n-1)^2 + 2 and (n+1)^2 + 2.

Original entry on oeis.org

3, 3, 2, 6, 3, 11, 6, 18, 11, 27, 18, 38, 27, 51, 38, 66, 51, 83, 66, 102, 83, 123, 102, 146, 123, 171, 146, 198, 171, 227, 198, 258, 227, 291, 258, 326, 291, 363, 326, 402, 363, 443, 402, 486, 443, 531, 486, 578, 531, 627, 578, 678, 627, 731, 678, 786, 731
Offset: 0

Views

Author

Paul Curtz, Jan 22 2016

Keywords

Comments

Trisections:
3, 6, 6, 27, 27, 66, 66, ... = 3*(1, 2, 2, 9, 9, 22, 22, ... ). See A056105.
3, 3, 18, 18, 51, 51, 102, ... = 3*(1, 1, 6, 6, 17, 17, ... ). See A056109.
2, 11, 11, 38, 38, 83, 83, ... (== 2 (mod 9)).
The trisections also have the signature (1,2,-2,-1,1). The corresponding main sequence is 0, 0, 0, 0, 1, 1, 3, 3, ... = A161680(n) with each term duplicated.

Examples

			a(0) = (2+13)/5, a(1) = (13+2)/5, a(2) = (5+5)/5, a(3) = (29+1)/5, ... (using first formula).
		

Crossrefs

Programs

  • Magma
    &cat [[(n-1)^2+2, (n+1)^2+2]: n in [0..50]]; // Vincenzo Librandi, Jan 23 2016
  • Mathematica
    Flatten[Table[{n^2 - 2 n + 3, n^2 + 2 n + 3}, {n, 0, 30}]] (* Vincenzo Librandi, Jan 23 2016 *)
    CoefficientList[Series[(3 - 7 x^2 + 4 x^3 + 2 x^4)/((1 - x)^3 (1 + x)^2), {x, 0, 56}], x] (* Michael De Vlieger, Jan 24 2016 *)
  • PARI
    Vec((3-7*x^2+4*x^3+2*x^4)/((1-x)^3*(1+x)^2) + O(x^100)) \\ Colin Barker, Jan 22 2016
    

Formula

a(n) = (A261327(n+2) + A261327(n-3))/5.
a(n+1) = a(n) + (-1)^n * A022998(n), a(0)=3.
a(n+3) = a(n) + 3*A193356(n), a(0)=a(1)=3, a(2)=2.
a(n) = 3 + A174474(n).
a(2n) + a(2n+1) = A255844(n).
From Colin Barker, Jan 22 2016: (Start)
a(n) = (2*n^2 - 6*(-1)^n*n - 2*n + 3*(-1)^n + 21)/8.
a(n) = (n^2 - 4*n + 12)/4 for n even.
a(n) = (n^2 + 2*n + 9)/4 for n odd.
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n > 4.
G.f.: (3 - 7*x^2 + 4*x^3 + 2*x^4) / ((1-x)^3*(1+x)^2).
(End)

Extensions

More terms from Colin Barker, Jan 22 2016

A354947 Number of primes adjacent to prime(n) in a hexagonal spiral of positive integers.

Original entry on oeis.org

2, 2, 0, 2, 1, 1, 0, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 2, 0, 1, 0, 0, 0, 0, 0, 2, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0
Offset: 1

Views

Author

Wade Reece Eberly, Sep 23 2022

Keywords

Examples

			The spiral begins
      13--12--11
      /         \
    14   4---3  10
    /   /     \   \
  15   5   1---2   9
    \   \         /
    16   6---7---8
      \
      17--18--19--...
For n=4, prime(4) = 7 in the spiral has a(4) = 2 primes adjacent (2 and 19).
		

Crossrefs

Cf. A307011, A307013 (spiral coordinates), A056105 (spiral first spoke).
Previous Showing 41-44 of 44 results.