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

A163586 a(1) = 3. For n > 1, Ulam's spiral is started with a(n-1), and the primes p on the NE spoke are considered. a(n) is the minimal p that is the lesser of a twin prime pair.

Original entry on oeis.org

3, 5, 17, 29, 41, 71, 101, 191, 281, 311, 617, 857, 1319, 1451, 1481, 1721, 2027, 2267, 2729, 2969, 2999, 3461, 3767, 4229, 4241, 4271, 20021, 22091, 22961, 23201, 23291, 27581, 31121, 31151, 31181, 32441, 32531, 32561, 32801, 32831, 33071, 33827, 35897
Offset: 1

Views

Author

Milton L. Brown (miltbrown(AT)earthlink.net), Jul 31 2009

Keywords

Examples

			Spiral for a(2)=5:
 21 20 19 18 17
 22 .9 .8 .7 16
 23 10 .5 .6 15
 24 11 12 13 14
 25 26 27 28 29
a(2)+4*k^2-2*k with k=1 is not taken since 7 is no lesser twin prime, but 17 (k=2) is.
		

Crossrefs

Programs

  • PARI
    twinp(p) = if(isprime(p) && isprime(p + 2),1,0);
    ulamNW(p, k) = p + 4*k^2-2*k;
    p = 1; for(n=1, 64, k=1; while (!twinp(ulamNW(p,k)), k++); p = ulamNW(p, k); print1(", ", p)) \\ Georg Fischer, Dec 03 2024

Formula

The terms on the NE spoke are given by a(n - 1) + 4*k^2 - 2*k for k >= 1.

Extensions

Edited by Georg Fischer, Dec 03 2024

A226940 a(0)=0; if a(n-1) is odd, a(n) = n + a(n-1), otherwise a(n) = n - a(n-1).

Original entry on oeis.org

0, 1, 3, 6, -2, 7, 13, 20, -12, 21, 31, 42, -30, 43, 57, 72, -56, 73, 91, 110, -90, 111, 133, 156, -132, 157, 183, 210, -182, 211, 241, 272, -240, 273, 307, 342, -306, 343, 381, 420, -380, 421, 463, 506, -462, 507, 553, 600, -552, 601, 651, 702, -650, 703, 757
Offset: 0

Views

Author

Enrico Santilli, Jun 23 2013

Keywords

Crossrefs

Cf. A081348 (second bisection); A002939, A054554, A054569, A068377.

Programs

  • Magma
    [IsZero(n) select 0 else IsOdd(Self(n)) select n+Self(n) else n-Self(n): n in [0..60]]; // Bruno Berselli, Jul 01 2013
    
  • Mathematica
    LinearRecurrence[{0, 0, 0, 3, 0, 0, 0, -3, 0, 0, 0, 1}, {0, 1, 3, 6, -2, 7, 13, 20, -12, 21, 31, 42}, 60] (* Bruno Berselli, Jul 01 2013 *)
  • Maxima
    makelist(coeff(taylor(x*(1+3*x+6*x^2-2*x^3+4*x^4+4*x^5+2*x^6-6*x^7+3*x^8+x^9)/((1-x)^3*(1+x)^3*(1+x^2)^3), x, 0, n), x, n), n, 0, 60); /* Bruno Berselli, Jul 01 2013 */

Formula

G.f.: x*(1 +3*x +6*x^2 -2*x^3 +4*x^4 +4*x^5 +2*x^6 -6*x^7 +3*x^8 +x^9)/((1-x)^3*(1+x)^3*(1+x^2)^3). [Bruno Berselli, Jul 01 2013]
a(n) = 3*a(n-4) -3*a(n-8) +a(n-12). [Bruno Berselli, Jul 01 2013]
a(4n) = -A002939(n), a(4n+1) = A054569(n+1), a(4n+2) = A054554(n+2), a(4n+3) = A068377(n+2). [Bruno Berselli, Jul 02 2013]

Extensions

More terms from Bruno Berselli, Jul 01 2013

A244679 The spiral of Champernowne read by the Northeast ray.

Original entry on oeis.org

1, 3, 1, 0, 3, 0, 1, 6, 1, 1, 3, 1, 2, 3, 2, 3, 7, 4, 4, 5, 5, 6, 7, 7, 7, 3, 9, 9, 7, 1, 2, 2, 5, 3, 6, 4, 5, 6, 2, 7, 7, 9, 0, 1, 1, 2, 0, 4, 7, 6, 2, 8, 5, 0, 6, 2, 5, 4, 2, 7, 7, 9, 0, 2, 1, 4, 0, 7, 7, 0, 2, 2, 5, 5, 6, 8, 5, 1, 2, 4, 7, 7, 0, 1, 1, 4, 0, 8, 7, 1, 2, 5, 5, 8, 6, 2, 5, 6, 2, 0, 0, 4, 0, 0, 8
Offset: 1

Views

Author

Robert G. Wilson v, Jul 04 2014

Keywords

Examples

			See A244677 for the spiral of David Gawen Champernowne.
		

Crossrefs

Programs

  • Mathematica
    almostNatural[n_, b_] := Block[{m = 0, d = n, i = 1, l, p}, While[m <= d, l = m; m = (b - 1) i*b^(i - 1) + l; i++]; i--; p = Mod[d - l, i]; q = Floor[(d - l)/i] + b^(i - 1); If[p != 0, IntegerDigits[q, b][[p]], Mod[q - 1, b]]]; f[n_] := 4n^2 - 10n + 7 (* see A244677 formula section *); Array[ almostNatural[ f@#, 10] &, 105]

Formula

See A244677 formula section.
Previous Showing 41-43 of 43 results.