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.

A047221 Numbers that are congruent to {2, 3} mod 5.

This page as a plain text file.
%I A047221 #87 Nov 22 2024 11:04:53
%S A047221 2,3,7,8,12,13,17,18,22,23,27,28,32,33,37,38,42,43,47,48,52,53,57,58,
%T A047221 62,63,67,68,72,73,77,78,82,83,87,88,92,93,97,98,102,103,107,108,112,
%U A047221 113,117,118,122,123,127,128,132,133,137,138,142,143,147,148,152,153
%N A047221 Numbers that are congruent to {2, 3} mod 5.
%C A047221 Theorem: if 5^((n-1)/2) = -1 (mod n) then n == 2 or 3 (mod 5) (see Crandall and Pomerance).
%C A047221 Start with 2. The next number, 3, cannot be written as the sum of two of the previous terms. So 3 is in. 4=2+2, 5=2+3, 6=3+3, so these are not in. But you cannot obtain 7, so the next term is 7. And so on. - _Fabian Rothelius_, Mar 13 2001
%C A047221 Also numbers k such that k^2 == -1 (mod 5). - _Vincenzo Librandi_, Aug 05 2010
%C A047221 For any (t,s) < n, a(t)*a(s) != a(n) and a(t) - a(s) != a(n). - _Anders Hellström_, Jul 01 2015
%C A047221 These numbers appear in the product of a Rogers-Ramanujan identity. See A003106 also for references. - _Wolfdieter Lang_, Oct 29 2016
%D A047221 Richard Crandall and Carl Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see Exercise 3.24, p. 154.
%H A047221 N. J. A. Sloane, <a href="/A047221/b047221.txt">Table of n, a(n) for n = 1..10000</a>
%H A047221 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1).
%F A047221 a(n) = 5*(n-1) - a(n-1) (with a(1)=2). - _Vincenzo Librandi_, Aug 05 2010
%F A047221 a(n) = (10*n - 3*(-1)^n - 5)/4.
%F A047221 G.f.: x*(2+x+2*x^2)/((1+x)*(1-x)^2).
%F A047221 a(n)^2 = 5*A118015(a(n)) + 4.
%F A047221 a(n) = 5 * (floor(n-1)/2) + 3 - n mod 2. - _Reinhard Zumkeller_, Nov 27 2012
%F A047221 Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(1-2/sqrt(5))*Pi/5. - _Amiram Eldar_, Dec 07 2021
%F A047221 E.g.f.: 2 + ((5*x - 5/2)*exp(x) - (3/2)*exp(-x))/2. - _David Lovler_, Aug 23 2022
%F A047221 From _Amiram Eldar_, Nov 22 2024: (Start)
%F A047221 Product_{n>=1} (1 - (-1)^n/a(n)) = 1.
%F A047221 Product_{n>=1} (1 + (-1)^n/a(n)) = 1/phi (A094214). (End)
%t A047221 {2,3}+#&/@(5 Range[0,30])//Flatten (* _Harvey P. Dale_, Jan 22 2023 *)
%o A047221 (Magma) [ n : n in [1..165] | n mod 5 eq 2 or n mod 5 eq 3 ];
%o A047221 (Haskell)
%o A047221 a047221 n = 5 * ((n - 1) `div` 2) + 3 - n `mod` 2
%o A047221 a047221_list = 2 : 3 : map (+ 5) a047221_list
%o A047221 -- _Reinhard Zumkeller_, Nov 27 2012
%o A047221 (PARI) Vec(x*(2+x+2*x^2)/((1+x)*(1-x)^2) + O(x^80)) \\ _Michel Marcus_, Jun 30 2015
%Y A047221 Cf. A118015 (floor(n^2/5)).
%Y A047221 Cf. A003631 (primes), A094214.
%Y A047221 Partitions into: A003106, A219607.
%K A047221 nonn,easy
%O A047221 1,1
%A A047221 _N. J. A. Sloane_
%E A047221 More terms from Larry Reeves (larryr(AT)acm.org), Apr 08 2002
%E A047221 Closed formula, g.f. and link added by _Bruno Berselli_, Nov 28 2010