login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A047221 Numbers that are congruent to {2, 3} mod 5. 36
2, 3, 7, 8, 12, 13, 17, 18, 22, 23, 27, 28, 32, 33, 37, 38, 42, 43, 47, 48, 52, 53, 57, 58, 62, 63, 67, 68, 72, 73, 77, 78, 82, 83, 87, 88, 92, 93, 97, 98, 102, 103, 107, 108, 112, 113, 117, 118, 122, 123, 127, 128, 132, 133, 137, 138, 142, 143, 147, 148, 152, 153 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Theorem: if 5^((n-1)/2) = -1 (mod n) then n == 2 or 3 (mod 5) (see Crandall and Pomerance).

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

Primitive roots of 5. The first differences are periodic: 1,4,1,4,1,4.... - Paolo P. Lava, Feb 29 2008

Also numbers n such that n^2 = -1 (mod 5). - Vincenzo Librandi, Aug 05 2010

For any (t,s)<n, a(t)*a(s) != a(n) and a(t)-a(s) != a(n) . - Anders Hellström, Jul 01 2015

These numbers appear in the product of a Rogers-Ramanujan identity. See A003106 also for references. - Wolfdieter Lang, Oct 29 2016

REFERENCES

R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see Exercise 3.24, p. 154.

LINKS

N. J. A. Sloane, Table of n, a(n) for n = 1..10000

Index entries for linear recurrences with constant coefficients, signature (1,1,-1).

FORMULA

a(n) = -3+(1/2)*Sum_{k=0..n}{5-3*(-1)^k}. - Paolo P. Lava, Feb 29 2008

a(n) = 5*(n-1)-a(n-1) (with a(1)=2). - Vincenzo Librandi, Aug 05 2010

a(n) = (10*n-3*(-1)^n-5)/4.

G.f.: x*(2+x+2*x^2)/((1+x)*(1-x)^2).

a(n)^2 = 5*A118015(a(n))+4.

a(n) = 5 * (floor(n-1)/2) + 3 - n mod 2. - Reinhard Zumkeller, Nov 27 2012

MAPLE

P:=proc(n, m) local a, i, ok; for i from 1 by 1 to n do if (i^(m-1) mod m)=1 then a:=1; ok:=1; while a<m-1 do if (i^a mod m)=1 then ok:=0; fi; a:=a+1; od; if ok=1 then print(i); fi; fi; od; end: P(100, 5); # Paolo P. Lava, Feb 29 2008

MATHEMATICA

Select[Range[0, 200], MemberQ[{2, 3}, Mod[#, 5]] &] (* Vladimir Joseph Stephan Orlovsky, Feb 12 2012 *)

PROG

(MAGMA) [ n : n in [1..165] | n mod 5 eq 2 or n mod 5 eq 3 ];

(Haskell)

a047221 n = 5 * ((n - 1) `div` 2) + 3 - n `mod` 2

a047221_list = 2 : 3 : map (+ 5) a047221_list

-- Reinhard Zumkeller, Nov 27 2012

(PARI) Vec(x*(2+x+2*x^2)/((1+x)*(1-x)^2) + O(x^80)) \\ Michel Marcus, Jun 30 2015

CROSSREFS

Cf. A118015 (floor(n^2/5)).

Cf. A003631 (primes).

Partitions into: A003106, A219607.

Sequence in context: A102664 A055053 A233998 * A331078 A032967 A111101

Adjacent sequences:  A047218 A047219 A047220 * A047222 A047223 A047224

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane

EXTENSIONS

More terms from Larry Reeves (larryr(AT)acm.org), Apr 08 2002

Closed formula, g.f. and link added by Bruno Berselli, Nov 28 2010

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 27 15:59 EST 2020. Contains 332307 sequences. (Running on oeis4.)