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.

A032528 Concentric hexagonal numbers: floor(3*n^2/2).

Original entry on oeis.org

0, 1, 6, 13, 24, 37, 54, 73, 96, 121, 150, 181, 216, 253, 294, 337, 384, 433, 486, 541, 600, 661, 726, 793, 864, 937, 1014, 1093, 1176, 1261, 1350, 1441, 1536, 1633, 1734, 1837, 1944, 2053, 2166, 2281, 2400, 2521, 2646, 2773, 2904, 3037, 3174, 3313, 3456, 3601, 3750
Offset: 0

Views

Author

Keywords

Comments

From Omar E. Pol, Aug 20 2011: (Start)
Cellular automaton on the hexagonal net. The sequence gives the number of "ON" cells in the structure after n-th stage. A007310 gives the first differences. For a definition without words see the illustration of initial terms in the example section. Note that the cells become intermittent. A083577 gives the primes of this sequences.
A033581 and A003154 interleaved.
Row sums of an infinite square array T(n,k) in which column k lists 2*k-1 zeros followed by the numbers A008458 (see example). (End)
Sequence found by reading the line from 0, in the direction 0, 1, ... and the same line from 0, in the direction 0, 6, ..., in the square spiral whose vertices are the generalized pentagonal numbers A001318. Main axis perpendicular to A045943 in the same spiral. - Omar E. Pol, Sep 08 2011

Examples

			From _Omar E. Pol_, Aug 20 2011: (Start)
Using the numbers A008458 we can write:
  0, 1, 6, 12, 18, 24, 30, 36, 42,  48,  54, ...
  0, 0, 0,  1,  6, 12, 18, 24, 30,  36,  42, ...
  0, 0, 0,  0,  0,  1,  6, 12, 18,  24,  30, ...
  0, 0, 0,  0,  0,  0,  0,  1,  6,  12,  18, ...
  0, 0, 0,  0,  0,  0,  0,  0,  0,   1,   6, ...
And so on.
===========================================
The sums of the columns give this sequence:
0, 1, 6, 13, 24, 37, 54, 73, 96, 121, 150, ...
...
Illustration of initial terms as concentric hexagons:
.
.                                         o o o o o
.                         o o o o        o         o
.             o o o      o       o      o   o o o   o
.     o o    o     o    o   o o   o    o   o     o   o
. o  o   o  o   o   o  o   o   o   o  o   o   o   o   o
.     o o    o     o    o   o o   o    o   o     o   o
.             o o o      o       o      o   o o o   o
.                         o o o o        o         o
.                                         o o o o o
.
. 1    6        13           24               37
.
(End)
		

Crossrefs

Programs

Formula

From Joerg Arndt, Aug 22 2011: (Start)
G.f.: (x+4*x^2+x^3)/(1-2*x+2*x^3-x^4) = x*(1+4*x+x^2)/((1+x)*(1-x)^3).
a(n) = +2*a(n-1) -2*a(n-3) +1*a(n-4). (End)
a(n) = (6*n^2+(-1)^n-1)/4. - Bruno Berselli, Aug 22 2011
a(n) = A184533(n), n >= 2. - Clark Kimberling, Apr 20 2012
First differences of A011934: a(n) = A011934(n) - A011934(n-1) for n>0. - Franz Vrabec, Feb 17 2013
From Paul Curtz, Mar 31 2019: (Start)
a(-n) = a(n).
a(n) = a(n-2) + 6*(n-1) for n > 1.
a(2*n) = A033581(n).
a(2*n+1) = A003154(n+1). (End)
E.g.f.: (3*x*(x + 1)*cosh(x) + (3*x^2 + 3*x - 1)*sinh(x))/2. - Stefano Spezia, Aug 19 2022
Sum_{n>=1} 1/a(n) = Pi^2/36 + tan(Pi/(2*sqrt(3)))*Pi/(2*sqrt(3)). - Amiram Eldar, Jan 16 2023

Extensions

New name and more terms a(41)-a(50) from Omar E. Pol, Aug 20 2011

A057199 The first nontrivial (k>n+2) palindromic prime in both bases n and n+2 or -1 if it does not exist.

Original entry on oeis.org

5, 1667, 7517, 34853363, 116755331881, 20537111057, 373
Offset: 2

Views

Author

Robert G. Wilson v, Sep 16 2000

Keywords

Comments

a(9) > 5.5*10^22, a(10) = 181, a(11) = 161292069901, a(12) = 773. - Giovanni Resta, Feb 28 2013
From Chai Wah Wu, Sep 16 2019: (Start)
a(13)-a(100) = 56941, 337, 169445909, 433, 578839, 541, 106121443, 661, 582983, 4519, 682764227, 937, 689851, 1093, 741551113, 7177, 2828257, 12043, 24785688133, 8167, 3350657, 6737, 78730410146989, 2053, 26105363, 2281, 8354404853, 2521, 6204901, 10169, 14829078601, 3037, 11169317, 3313, ?, 27611, 18718787, 9103, 771909202297, 21067, 25391137, 74167, ?, 37363, 90483233, 26107, 736007755807927, 5581, 22104937, 5953, 276580159573, 6337, 28246531, 6733, 200524263889, 54751, 131969267, 7561, ?, 7993, 135040879, 19687, 1451803410833, 8893, 462569659, 46807, 792717779333, 22963, 451983979, 10333, ?, 10837, 81892231, 11353, 1873894723213, 59407, 393477817, 12421, 10617265587037, 12973, 663428993, 13537, ?, 51749, 507537761, 34303, 16515848080133, 76507.
It seems that when n is of the form 12*m + 11, a(n) tends to be large (if it exists at all).
For n > 2, a(n) >= n^2+5n+1 if it exists. Proof: Let a(n) = k. k must have at least 2 digits in base n since k > n+2. If k has 2 digits, then k = an+a which is composite for a > 1. If a = 1, then k = n+1 < n+2. Thus k must have at least 3 digits in base n. If k is a palindrome in base n written as 1x1 where x < 5, then k in base n+2 is a 2 digit palindrome which again would be composite as k > n+3 for n > 2.
Suppose n > 6 is even. Then a(n) >= 3*n^2/2 + 3*n + 1 if it exists. If 3*n^2/2 + 3*n + 1 is prime, then a(n) = 3*n^2/2 + 3*n + 1. Proof: by the above, a(n) must be of the form 1x1 in base n = 1y1 in base n+2 with 4 < x < n and y > 0. This corresponds to nx = 4(n+1)+(n+2)y. Solving this linear Diophantine equation in x and y shows that x = n/2 + 3 and y = n/2 - 2 which implies that 1x1 in base n = 3*n^2/2 + 3*n + 1.
This also implies that the prime star numbers A083577(n) for n > 3 is a subsequence.
Conjecture: a(n) <> -1 for all n.
(End)

Examples

			a(3) = 1667 because it is the first prime > 5 which is a palindrome in both base 3 and 5.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = n + 3}, While[a = IntegerDigits[k, n]; b = IntegerDigits[k, n + 2]; ! PrimeQ[k] || a != Reverse[a] || b != Reverse[b], k++]; k]; Do[ Print[{n, f[n] // Timing}], {n, 2, 10}]

Extensions

a(6)-a(8) from Giovanni Resta, Feb 28 2013

A184899 n such that the n-th centered 12-gonal number is prime. Indices of prime star numbers.

Original entry on oeis.org

2, 3, 4, 6, 8, 9, 10, 11, 13, 14, 19, 20, 21, 23, 24, 31, 32, 33, 34, 36, 37, 39, 42, 43, 44, 46, 47, 48, 52, 56, 59, 61, 66, 68, 74, 75, 78, 79, 85, 87, 89, 94, 96, 98, 101, 102, 105, 107, 108, 110, 113, 118, 121, 124, 125, 127, 130, 131, 133, 135, 136, 138
Offset: 1

Views

Author

Jonathan Vos Post, Feb 01 2011

Keywords

Comments

For n > 3, A003154(a(n)) = A057199(2*a(n)-2). - Chai Wah Wu, Sep 17 2019

Examples

			98 is in the sequence because 6*98^2 - 6*98 + 1 = 57037 is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[140],PrimeQ[6#^2-6#+1]&]  (* Harvey P. Dale, Feb 16 2011 *)

Formula

{n: 6*n^2 - 6*n + 1 is prime} = {n: A003154(n) is in A000040}.

A346948 Isolated single primes enclosed by six composites on hexagonal spiral board of odd numbers.

Original entry on oeis.org

211, 257, 277, 331, 509, 563, 587, 647, 653, 673, 683, 709, 751, 757, 839, 853, 919, 983, 997, 1087, 1117, 1123, 1163, 1283, 1433, 1447, 1493, 1531, 1579, 1637, 1733, 1777, 1889, 1913, 1973, 1993, 2179, 2207, 2251, 2273, 2287, 2333, 2357, 2399, 2447, 2467
Offset: 1

Views

Author

Ya-Ping Lu, Aug 08 2021

Keywords

Comments

It seems that more isolated primes, m, appear in regions 6*k^2-16*k+13 <= m <= 6*k^2-14*k+7 and 6*k^2-10*k+7 <= m <= 6*k^2-8*k+1 than the other 4 regions, where k (>= 1) is the layer number on the hexagonal board, which is illustrated in A345654.
Numbers of prime terms appearing in the 6 regions and 6 arms of a 10000-layer hexagonal board, with the 299970001 odd numbers up to 599940001, are:
Region Appearance Arm Appearance
---------------------------------- ---------- ----------------- ----------
6*k^2-18*k+15 <= m <= 6*k^2-16*k+9 2681490 m = 6*k^2-16*k+11 692
6*k^2-16*k+13 <= m <= 6*k^2-14*k+7 3192576 m = 6*k^2-14*k+ 9 551
6*k^2-14*k+11 <= m <= 6*k^2-12*k+5 2681571 m = 6*k^2-12*k+ 7 671
6*k^2-12*k+ 9 <= m <= 6*k^2-10*k+3 2681254 m = 6*k^2-10*k+ 5 545
6*k^2-10*k+ 7 <= m <= 6*k^2- 8*k+1 3191045 m = 6*k^2- 8*k+ 3 721
6*k^2- 8*k+ 5 <= m <= 6*k^2- 6*k-1 2680620 m = 6*k^2- 6*k+ 1 1040

Examples

			3 is not a term because four of the six neighbors (1, 5, 13, 15, 17 and 19) are primes.
211 is a term because 211 is a prime and all six neighbors (145, 147, 209, 213, 287 and 289) are composites.
		

Crossrefs

Programs

  • Python
    from sympy import isprime; from math import sqrt, ceil
    def neib(m):
        if m == 1: return [3, 5, 7, 9, 11, 13]
        if m == 3: return [17, 19, 5, 1, 13, 15]
        L = [m for i in range(6)]; n = int(ceil((3+sqrt(6*m + 3))/6)); x=6*n*n; y=12*n
        a0 = x-18*n+15; a1 =x-16*n+11; a2 =x-14*n+9
        a3 = x-y+7; a4 =x-10*n+5; a5 =x-8*n+3; a6 =x-6*n+1
        p = 0 if m==a0 else 1 if m>a0 and ma1 and ma2 and ma3 and ma4 and ma5 and m
    				
Showing 1-4 of 4 results.