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.

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

This page as a plain text file.
%I A226276 #44 May 11 2025 19:18:02
%S A226276 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,
%T A226276 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,
%U A226276 8,4,4,4,8,4,4,4,8,4,4,4,8,4,4,4
%N A226276 Period 4: repeat [8, 4, 4, 4].
%C A226276 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.
%C A226276 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:
%C A226276 s(n+) includes all primes of the form 4*m+1 with m>=2. Thus excluding 5.
%C A226276 s(n-) includes all primes of the form 4*m+3 with m>=0.
%C A226276 Together these include all primes (except 2 and 5) without duplication.
%C A226276 The primes "p(+)" within s(n+) "appear" in the form 3*p(+) within s(n-).
%C A226276 The primes "p(-)" within s(n-) "appear" in the form 3*p(-) within s(n+).
%C A226276 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.
%C A226276 (NOTE: In the above "m" is not that same index as "n").
%C A226276 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).
%C A226276 Also, continued fraction expansion of 4 + sqrt(646)/6. - _Bruno Berselli_, Jun 20 2013
%H A226276 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,1).
%F A226276 For generating the summation sequence s, start with s(0) = 1, and a(0) = 8.
%F A226276 For positive values of s(n): s(n+1) = s(n) + a(n).
%F A226276 For negative values of s(n): s(n-1) = s(n) - a(n-1). Here, n is negative.
%F A226276 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.
%F A226276 From _Bruno Berselli_, Jun 20 2013: (Start)
%F A226276 G.f.: 4*(2+x+x^2+x^3)/((1-x)*(1+x)*(1+x^2)).
%F A226276 a(n) = 4 + (1 + (-1)^n)*(1 + I^(n*(n+1))). (End)
%F A226276 From _Wesley Ivan Hurt_, Jul 09 2016: (Start)
%F A226276 a(n) = a(n-4) for n>3.
%F A226276 a(n) = 5 + I^(2*n) + I^(-n) + I^n.
%F A226276 a(n) = 5 + cos(n*Pi) + 2*cos(n*Pi/2) + I*sin(n*Pi). (End)
%e A226276 s(1) = 9, s(2) = 13, s(3) = 17, s(4) = 21, s(5) = 29, s(6) = 33, s(7) = 37.
%e A226276 s(-1) = -3, s(-2) = -7, s(-3) = -11, s(-4) = -19, s(-5) = -23, s(-6) = -27, s(-7) = -31.
%p A226276 seq(op([8, 4, 4, 4]), n=0..40); # _Wesley Ivan Hurt_, Jul 09 2016
%t A226276 Flatten[Table[{8, 4, 4, 4}, {20}]] (* _Bruno Berselli_, Jun 20 2013 *)
%t A226276 PadRight[{},120,{8,4,4,4}] (* _Harvey P. Dale_, May 11 2025 *)
%o A226276 (Magma) &cat [[8, 4, 4, 4]^^30]; // _Wesley Ivan Hurt_, Jul 09 2016
%o A226276 (PARI) a(n)=if(n%4,4,8) \\ _Charles R Greathouse IV_, Jul 17 2016
%Y A226276 Cf. A002114, A002145, A121262, A177704, A226294.
%K A226276 nonn,easy
%O A226276 0,1
%A A226276 _Richard R. Forberg_, Jun 01 2013
%E A226276 Simpler name from _Joerg Arndt_, Jun 16 2013