login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A260181 Numbers whose last digit is prime. 5
2, 3, 5, 7, 12, 13, 15, 17, 22, 23, 25, 27, 32, 33, 35, 37, 42, 43, 45, 47, 52, 53, 55, 57, 62, 63, 65, 67, 72, 73, 75, 77, 82, 83, 85, 87, 92, 93, 95, 97, 102, 103, 105, 107, 112, 113, 115, 117, 122, 123, 125, 127, 132, 133, 135, 137, 142, 143, 145, 147 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Numbers ending in 2, 3, 5 or 7.
The subsequence of primes is A042993. - Michel Marcus, Jul 19 2015
From Wesley Ivan Hurt, Aug 15 2015, Sep 26 2015: (Start)
Ceiling(a(n)/2) = A047201(n).
Complement of (A197652 Union A262389). (End)
LINKS
FORMULA
G.f.: x*(2+x+2*x^2+2*x^3+3*x^4) / ((x-1)^2*(1+x+x^2+x^3)).
a(n) = a(n-1)+a(n-4)-a(n-5), n>5.
a(n) = (5*n-4-(-1)^n+((3-(-1)^n)/2)*(-1)^((2*n+5-(-1)^n)/4))/2.
MAPLE
A260181:=n->(5*n-4-(-1)^n+((3-(-1)^n)/2)*(-1)^((2*n+5-(-1)^n)/4))/2: seq(A260181(n), n=1..100);
MATHEMATICA
CoefficientList[Series[(2 + x + 2 x^2 + 2 x^3 + 3 x^4)/((x - 1)^2*(1 + x + x^2 + x^3)), {x, 0, 100}], x]
LinearRecurrence[{1, 0, 0, 1, -1}, {2, 3, 5, 7, 12}, 60] (* Vincenzo Librandi, Jul 18 2015 *)
Table[(5n - 4 - (-1)^n + ((3 - (-1)^n)/2)*(-1)^((2*n + 5 - (-1)^n)/4))/2, {n, 100}] (* Wesley Ivan Hurt, Aug 11 2015 *)
PROG
(Magma) [(5*n-4-(-1)^n+((3-(-1)^n) div 2)*(-1)^((2*n+5-(-1)^n) div 4))/2: n in [1..70]]; // Vincenzo Librandi, Jul 18 2015
(PARI) is(n)=my(m=digits(n)); isprime(m[#m]) \\ Anders Hellström, Jul 19 2015
(PARI) A260181(n)=(n--)\4*10+prime(n%4+1) \\ is(n)=isprime(n%10) is much more efficient than the above. - M. F. Hasler, Sep 16 2016
(GAP) a:=n->(5*n-4-(-1)^n+((3-(-1)^n)/2)*(-1)^((2*n+5-(-1)^n)/4))/2; List([1..60], n->a(n)); # Muniru A Asiru, Feb 16 2018
CROSSREFS
Cf. A042993, A047201, A092620, subset of A118950.
Union of A017293, A017305, A017329 and A017353.
First differences are [1,2,2,5,...] = A002522(A140081(n-1)).
Sequence in context: A092620 A028843 A028842 * A140971 A073689 A257560
KEYWORD
nonn,base,easy
AUTHOR
Wesley Ivan Hurt, Jul 17 2015
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 04:42 EDT 2024. Contains 371964 sequences. (Running on oeis4.)