login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A253721
Triprimes modulo 10.
3
8, 2, 8, 0, 7, 8, 0, 2, 4, 5, 0, 2, 3, 6, 8, 0, 5, 6, 8, 2, 8, 9, 2, 5, 0, 4, 6, 7, 4, 5, 0, 8, 7, 8, 3, 4, 4, 5, 0, 1, 2, 4, 5, 2, 6, 8, 0, 5, 7, 2, 2, 0, 1, 6, 8, 2, 4, 5, 6, 5, 8, 1, 6, 8, 3, 5, 9, 2, 4, 5, 6, 0, 2, 0, 6, 8, 2, 5, 2, 3, 8, 3, 5, 4, 6, 7
OFFSET
1,1
COMMENTS
Last digit of triprimes (A014612).
FORMULA
a(n) = A010879(A014612(n)). - Michel Marcus, May 03 2015
MAPLE
with(numtheory): A253721:=n->`if`(bigomega(n) = 3, n mod 10, NULL): seq(A253721(n), n=1..500);
MATHEMATICA
Mod[#, 10] & /@ Select[Range[500], PrimeOmega[#] == 3 &]
PROG
(Haskell)
a253721 = flip mod 10 . a014612 -- Reinhard Zumkeller, May 05 2015
(PARI) do(x)=my(v=List(), t); forprime(p=2, x\4, forprime(q=2, min(x\(2*p), p), t=p*q; forprime(r=2, min(x\t, q), listput(v, t*r)))); Set(v)%10 \\ Charles R Greathouse IV, Aug 30 2017
(Python)
from math import isqrt
from sympy import primepi, primerange, integer_nthroot
def A253721(n):
def f(x): return int(n+x-sum(primepi(x//(k*m))-b for a, k in enumerate(primerange(integer_nthroot(x, 3)[0]+1)) for b, m in enumerate(primerange(k, isqrt(x//k)+1), a)))
m, k = n, f(n)
while m != k:
m, k = k, f(k)
return m%10 # Chai Wah Wu, Aug 17 2024
CROSSREFS
Cf. A010879 (final digit of n), A014612 (triprimes).
Cf. A007652 (primes mod 10), A106146 (semiprimes mod 10).
Cf. A255646 (subsequence).
Sequence in context: A134724 A269546 A248299 * A021551 A143025 A303326
KEYWORD
nonn,base,easy
AUTHOR
Wesley Ivan Hurt, May 02 2015
STATUS
approved