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

A056109 Fifth spoke of a hexagonal spiral.

Original entry on oeis.org

1, 6, 17, 34, 57, 86, 121, 162, 209, 262, 321, 386, 457, 534, 617, 706, 801, 902, 1009, 1122, 1241, 1366, 1497, 1634, 1777, 1926, 2081, 2242, 2409, 2582, 2761, 2946, 3137, 3334, 3537, 3746, 3961, 4182, 4409, 4642, 4881, 5126, 5377, 5634, 5897, 6166, 6441
Offset: 0

Views

Author

Henry Bottomley, Jun 09 2000

Keywords

Comments

Squared distance from (0,0,-1) to (n,n,n) in R^3. - James R. Buddenhagen, Jun 15 2013

Examples

			Illustration of initial terms:
.
.                                                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              17                   34
- _Aaron David Fairbanks_, Feb 16 2025
		

Crossrefs

Cf. A008810, A122430 (prime terms).
Other spirals: A054552.
Cf. A000290.

Programs

  • GAP
    List([0..50],n->3*n^2+2*n+1); # Muniru A Asiru, Oct 07 2018
  • Magma
    [3*n^2 + 2*n + 1: n in [0..50]]; // Vincenzo Librandi, Mar 15 2013
    
  • Maple
    seq(coeff(series(n!*(exp(x)*(3*x^2+5*x+1)),x,n+1), x, n), n = 0 .. 50); # Muniru A Asiru, Oct 07 2018
  • Mathematica
    Table[3 n^2 + 2 n + 1, {n, 0, 100}] (* Vincenzo Librandi, Mar 15 2013 *)
    LinearRecurrence[{3,-3,1},{1,6,17},60] (* Harvey P. Dale, Mar 28 2019 *)
  • PARI
    {a(n) = 3*n^2 + 2*n + 1}; /* Michael Somos, Aug 03 2006 */
    
  • PARI
    Vec((1+3*x+2*x^2)/(1-3*x+3*x^2-x^3)+O(x^100)) \\ Stefano Spezia, Oct 17 2018
    

Formula

a(n) = 3n^2+2n+1 = a(n-1)+6n-1 = 2a(n-1)-a(n-2)+6 = 3a(n-1)-3a(n-2)+a(n-3) = A056105(n)+4n = A056106(n)+3n = A056107(n)+2n = A056108(n)+n = A003215(n)-n.
G.f.: (1+3*x+2*x^2)/(1-3*x+3*x^2-x^3). - Colin Barker, Jan 04 2012
G.f.: (1 + x) * (1 + 2*x) / (1 - x)^3. - Michael Somos, Feb 04 2012
a(n) = A008810(3*n + 1) = A056105(-n). - Michael Somos, Aug 03 2006
E.g.f.: exp(x)*(1 + 5*x + 3*x^2). - Stefano Spezia, Oct 06 2018
a(n) = A000290(n+1) + 2*A000290(n). - Leo Tavares, May 29 2023
a(n) = A069894(n) - A000290(n+1). - Jarrod G. Sage, Jul 19 2024

A216894 n - (sum of prime factors of n) is a positive square.

Original entry on oeis.org

1, 6, 22, 54, 68, 164, 166, 336, 388, 454, 588, 854, 886, 1086, 1122, 1124, 1636, 1710, 1828, 2182, 2356, 2468, 2702, 2960, 3046, 3048, 3708, 3748, 3770, 4036, 4054, 4655, 5106, 5394, 5636, 6502, 7108, 7368, 7956, 8324, 9170, 9188, 9412, 9438, 9471, 9726
Offset: 1

Views

Author

Michel Lagneau, Sep 19 2012

Keywords

Comments

Contains 4p for odd prime p if 3p-2 is a square, in particular if p is in A122430. - Robert Israel, Apr 13 2014

Examples

			54 = 2*3^3 and 54 -(2+3) = 49 is a square, hence 54 is in the sequence.
		

Crossrefs

Cf. A008472.

Programs

  • Maple
    filter:= proc(x) local y;
        y:= x - add(i, i=numtheory:-factorset(x));
        y > 0 and issqr(y)
    end proc;
    N:= 10000;  # to get all entries <= N
    A216894:= select(filter,[$1..N]); # Robert Israel, Apr 13 2014
  • Mathematica
    nspfQ[n_]:=Module[{c=n-Total[Transpose[FactorInteger[n]][[1]]]},c>0 && IntegerQ[ Sqrt[c]]]; Join[{1},Select[Range[10000],nspfQ]] (* Harvey P. Dale, Feb 12 2015 *)
Showing 1-2 of 2 results.