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.

A253721 Triprimes modulo 10.

This page as a plain text file.
%I A253721 #23 Aug 17 2024 01:33:25
%S A253721 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,
%T A253721 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,
%U A253721 4,5,6,0,2,0,6,8,2,5,2,3,8,3,5,4,6,7
%N A253721 Triprimes modulo 10.
%C A253721 Last digit of triprimes (A014612).
%H A253721 Reinhard Zumkeller, <a href="/A253721/b253721.txt">Table of n, a(n) for n = 1..10000</a>
%H A253721 <a href="/index/Fi#final">Index entries for sequences related to final digits of numbers</a>
%F A253721 a(n) = A010879(A014612(n)). - _Michel Marcus_, May 03 2015
%p A253721 with(numtheory): A253721:=n->`if`(bigomega(n) = 3, n mod 10, NULL): seq(A253721(n), n=1..500);
%t A253721 Mod[#, 10] & /@ Select[Range[500], PrimeOmega[#] == 3 &]
%o A253721 (Haskell)
%o A253721 a253721 = flip mod 10 . a014612  -- _Reinhard Zumkeller_, May 05 2015
%o A253721 (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
%o A253721 (Python)
%o A253721 from math import isqrt
%o A253721 from sympy import primepi, primerange, integer_nthroot
%o A253721 def A253721(n):
%o A253721     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)))
%o A253721     m, k = n, f(n)
%o A253721     while m != k:
%o A253721         m, k = k, f(k)
%o A253721     return m%10 # _Chai Wah Wu_, Aug 17 2024
%Y A253721 Cf. A010879 (final digit of n), A014612 (triprimes).
%Y A253721 Cf. A007652 (primes mod 10), A106146 (semiprimes mod 10).
%Y A253721 Cf. A255646 (subsequence).
%K A253721 nonn,base,easy
%O A253721 1,1
%A A253721 _Wesley Ivan Hurt_, May 02 2015