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.

A073830 a(n) = 4*((n-1)! + 1) + n (mod n*(n + 2)).

This page as a plain text file.
%I A073830 #45 Apr 03 2023 10:36:10
%S A073830 0,2,0,8,0,10,56,12,22,14,0,16,182,18,34,20,0,22,380,24,46,26,552,28,
%T A073830 29,30,58,32,0,34,992,36,37,38,74,40,1406,42,82,44,0,46,1892,48,94,50,
%U A073830 2256,52,53,54,106,56,2862,58,59,60,118,62,0,64,3782,66,67,68,134,70
%N A073830 a(n) = 4*((n-1)! + 1) + n (mod n*(n + 2)).
%H A073830 Amiram Eldar, <a href="/A073830/b073830.txt">Table of n, a(n) for n = 1..10000</a>
%H A073830 Chris Caldwell, <a href="https://t5k.org/glossary/page.php?sort=TwinPrime">Twin Prime</a>
%H A073830 P. A. Clement, <a href="https://doi.org/10.2307/2305816">Congruences for sets of primes</a>, The American Mathematical Monthly, Vol. 56, No. 1 (1949), pp. 23-25.
%H A073830 PlanetMath, <a href="https://planetmath.org/clementstheoremontwinprimes">Clement’s theorem on twin primes</a>.
%F A073830 a(n) = A073829(n) mod A005563(n).
%F A073830 For n > 1: a(n) = 0 iff (n, n+2) are twin primes (Clement, 1949).
%F A073830 From _Bernard Schott_, Nov 16 2021: (Start)
%F A073830 If p is an odd prime, and p+2 is composite, then a(p) = p*(p+1).
%F A073830 If m is composite, and m+2 is prime, then a(m) = 2*(m+2).
%F A073830 If n even >= 4, a(n) = n + 4.
%F A073830 If p prime >= 5, a(p^2) = p^2 + 4. (End)
%p A073830 A073830 := proc(n)
%p A073830     4*((n-1)!+1)+n ;
%p A073830     modp(%,n*(n+2)) ;
%p A073830 end proc:
%p A073830 seq(A073830(n),n=1..60) ; # _R. J. Mathar_, Feb 21 2017
%t A073830 a[n_] := Mod[4 ((n - 1)! + 1) + n, n (n + 2)]; Array[a, 66] (* _Jean-François Alcover_, Feb 22 2018 *)
%o A073830 (Magma) [(4*(Factorial(n-1)+1)+n) mod (n^2+2*n): n in [1..70]]; // _Vincenzo Librandi_, May 04 2014
%Y A073830 Cf. A001359, A005563, A006512, A073831, A073832.
%K A073830 nonn
%O A073830 1,2
%A A073830 _Reinhard Zumkeller_, Aug 12 2002