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.

A090772 Numbers that are congruent to {2, 8} mod 10.

Original entry on oeis.org

2, 8, 12, 18, 22, 28, 32, 38, 42, 48, 52, 58, 62, 68, 72, 78, 82, 88, 92, 98, 102, 108, 112, 118, 122, 128, 132, 138, 142, 148, 152, 158, 162, 168, 172, 178, 182, 188, 192, 198, 202, 208, 212, 218, 222, 228, 232, 238, 242, 248, 252, 258, 262, 268, 272, 278, 282
Offset: 1

Views

Author

Giovanni Teofilatto, Feb 07 2004

Keywords

Comments

Their square ends in the digit 4. - Kausthub Gudipati, Sep 08 2011
10*a(n) = 20, 80, 120, 180, 220, ... are the only numbers written in French ending in "vingt(s)". - Paul Curtz, Aug 02 2018

Crossrefs

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(2*x*(1+3*x+x^2)/((1+x)*(1-x)^2))); // G. C. Greubel, Aug 08 2018
  • Mathematica
    Union@ Flatten@ Outer[Plus, {2, 8}, 10 Range[0, 28]] (* or *)
    CoefficientList[Series[2 (1 + 3x + x^2)/((1 + x) (1 - x)^2), {x, 0, 57}], x] (* Michael De Vlieger, Aug 02 2018 *)
    LinearRecurrence[{1, 1, -1}, {2, 8, 12}, 61] (* Robert G. Wilson v, Aug 08 2018 *)
  • PARI
    is(n) = #setintersect([2, 8], [n%10]) > 0 \\ Felix Fröhlich, Aug 02 2018
    
  • PARI
    Vec(2*x*(1+3*x+x^2)/((1+x)*(1-x)^2) + O(x^60)) \\ Felix Fröhlich, Aug 02 2018
    

Formula

a(n) = 2 * A047209(n).
a(n) = 10*n - a(n-1) - 10 (with a(1)=2). - Vincenzo Librandi, Nov 16 2010
G.f.: 2*x*(1+3*x+x^2)/((1+x)*(1-x)^2). - Bruno Berselli, Sep 08 2011
a(1) = 2. For n > 1, a(n) = a(n-1) + A226294(n). - Felix Fröhlich, Aug 02 2018
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(1+2/sqrt(5))*Pi/10. - Amiram Eldar, Dec 28 2021
E.g.f.: 2 + ((10*x - 5)*exp(x) + exp(-x))/2. - David Lovler, Sep 03 2022
From Amiram Eldar, Nov 23 2024: (Start)
Product_{n>=1} (1 - (-1)^n/a(n)) = tan(3*Pi/10) (A019952).
Product_{n>=1} (1 + (-1)^n/a(n)) = cosec(2*Pi/5)/2 (= A179290 / 2). (End)

Extensions

Edited and extended by Ray Chandler, Feb 10 2004

A226276 Period 4: repeat [8, 4, 4, 4].

Original entry on oeis.org

8, 4, 4, 4, 8, 4, 4, 4, 8, 4, 4, 4, 8, 4, 4, 4, 8, 4, 4, 4, 8, 4, 4, 4, 8, 4, 4, 4, 8, 4, 4, 4, 8, 4, 4, 4, 8, 4, 4, 4, 8, 4, 4, 4, 8, 4, 4, 4, 8, 4, 4, 4, 8, 4, 4, 4, 8, 4, 4, 4, 8, 4, 4, 4, 8, 4, 4, 4, 8, 4, 4, 4, 8, 4, 4, 4, 8, 4, 4, 4, 8, 4, 4, 4
Offset: 0

Views

Author

Richard R. Forberg, Jun 01 2013

Keywords

Comments

Old name was: A four-term repeating sequence for constructing a summation sequence from negative to positive infinity containing all primes except 2 and 5.
a(n) allows for the creation of an infinite summation sequence, s(n), extending from negative to positive infinity. (See Formula section below.) With appropriate initialization, letting "s(n+)" be the set positive s(n) values, and "s(n-)" be the absolute value of the set of negative s(n) values, the following applies:
s(n+) includes all primes of the form 4*m+1 with m>=2. Thus excluding 5.
s(n-) includes all primes of the form 4*m+3 with m>=0.
Together these include all primes (except 2 and 5) without duplication.
The primes "p(+)" within s(n+) "appear" in the form 3*p(+) within s(n-).
The primes "p(-)" within s(n-) "appear" in the form 3*p(-) within s(n+).
By using this simple repeating pattern, rather than the two well known linear formulas above, all primes (except 2 and 5) are included via a single construction mechanism, and all integers ending in the digit 5 are excluded mathematically, resulting in fewer nonprimes among the values of s(n) than there are in the combination of 4*m+1 and 4*m+3.
(NOTE: In the above "m" is not that same index as "n").
This is one of only two such repeating sequences with the property of generating a summation sequence that includes all integers ending in 1,3,7 or 9, and thus all primes except 2 and 5 (for the other see A226294). Both have the same density of primes in s(n), because both generate only 40% of the integers (in absolute value). And both presumably have the same average density of primes in positive vs. negative values of s(n).
Also, continued fraction expansion of 4 + sqrt(646)/6. - Bruno Berselli, Jun 20 2013

Examples

			s(1) = 9, s(2) = 13, s(3) = 17, s(4) = 21, s(5) = 29, s(6) = 33, s(7) = 37.
s(-1) = -3, s(-2) = -7, s(-3) = -11, s(-4) = -19, s(-5) = -23, s(-6) = -27, s(-7) = -31.
		

Crossrefs

Programs

Formula

For generating the summation sequence s, start with s(0) = 1, and a(0) = 8.
For positive values of s(n): s(n+1) = s(n) + a(n).
For negative values of s(n): s(n-1) = s(n) - a(n-1). Here, n is negative.
All values of a(n) are positive regardless of index. For example: a(-1) = a(-2) = a(-3) = 4; a(-4) = 8. Thus the simple pattern of a(n) and the simple arithmetic for generating s(n), are maintained across the n=0 boundary, in a manner similar to extending Fibonacci numbers to negative indices.
From Bruno Berselli, Jun 20 2013: (Start)
G.f.: 4*(2+x+x^2+x^3)/((1-x)*(1+x)*(1+x^2)).
a(n) = 4 + (1 + (-1)^n)*(1 + I^(n*(n+1))). (End)
From Wesley Ivan Hurt, Jul 09 2016: (Start)
a(n) = a(n-4) for n>3.
a(n) = 5 + I^(2*n) + I^(-n) + I^n.
a(n) = 5 + cos(n*Pi) + 2*cos(n*Pi/2) + I*sin(n*Pi). (End)

Extensions

Simpler name from Joerg Arndt, Jun 16 2013
Showing 1-2 of 2 results.