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.

Previous Showing 101-110 of 478 results. Next

A049579 Numbers k such that prime(k)+2 divides (prime(k)-1)!.

Original entry on oeis.org

4, 6, 8, 9, 11, 12, 14, 15, 16, 18, 19, 21, 22, 23, 24, 25, 27, 29, 30, 31, 32, 34, 36, 37, 38, 39, 40, 42, 44, 46, 47, 48, 50, 51, 53, 54, 55, 56, 58, 59, 61, 62, 63, 65, 66, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that prime(k+1) - prime(k) does not divide prime(k+1) + prime(k). These are the numbers k for which prime(k+1) - prime(k) > 2. - Thomas Ordowski, Mar 31 2022
If we prepend 1, the first differences are A251092 (see also A175632). The complement is A029707. - Gus Wiseman, Dec 03 2024

Examples

			prime(4) = 7, 6!+1 = 721 gives residue 1 when divided by prime(4)+2 = 9.
		

Crossrefs

The first differences are A251092 except first term, run-lengths A373819.
The complement is A029707.
Runs of terms differing by one have lengths A027833, min A107770, max A155752.
A000040 lists the primes, differences A001223 (run-lengths A333254, A373821).
A038664 finds the first prime gap of difference 2n.
A046933 counts composite numbers between primes.
A071148 gives partial sums of odd primes.

Programs

  • Mathematica
    pnmQ[n_]:=Module[{p=Prime[n]},Mod[(p-1)!+1,p+2]==1]; Select[Range[ 100],pnmQ] (* Harvey P. Dale, Jun 24 2017 *)
  • PARI
    isok(n) = (((prime(n)-1)! + 1) % (prime(n)+2)) == 1; \\ Michel Marcus, Dec 31 2013

Extensions

Definition edited by Thomas Ordowski, Mar 31 2022

A078571 Total number of prime factors of the average of n-th twin prime pair.

Original entry on oeis.org

2, 2, 3, 3, 3, 3, 4, 5, 3, 5, 3, 4, 5, 7, 4, 4, 6, 5, 3, 5, 4, 5, 7, 4, 4, 4, 6, 3, 3, 5, 6, 3, 5, 4, 5, 5, 5, 5, 4, 5, 9, 4, 4, 4, 4, 6, 5, 5, 4, 6, 5, 7, 4, 3, 4, 4, 7, 3, 5, 5, 5, 5, 3, 6, 8, 4, 5, 3, 7, 5, 6, 3, 5, 9, 3, 9, 5, 5, 5, 3, 6, 7, 7, 8, 4, 4, 6, 5, 8, 4, 4, 3, 5, 7, 5, 3, 4, 7, 5, 5, 5, 3, 4, 4, 5
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 29 2002

Keywords

Comments

Between every twin prime pair is a composite number. This sequence looks at a characteristic of those numbers. If the number, n, is the average of a twin prime pair, p&q, then n=(p+q)/2 and p*q=n^2 -1. [Robert G. Wilson v, Aug 02 2010]

Examples

			12th twin prime pair = (A001359(12), A006512(12)) = (149,151), hence A014574(12) = 150 = 2*3*5*5, therefore a(12) = 4.
From _Robert G. Wilson v_, Aug 02 2010: (Start)
2) 4, 6 and no others < 10^9.
3) 12, 18, 30, 42, 102, 138, 282, 618, 642, 822, 1698, 1878, 2082, ...
4) 60, 150, 198, 228, 348, 462, 522, 570, 858, 1062, 1230, 1278, ...
5) 72, 108, 180, 270, 312, 420, 660, 828, 882, 1020, 1032, 1050, ...
6) 240, 600, 810, 1320, 1488, 2088, 2340, 2970, 3300, 4158, 4272, ...
7) 192, 432, 1620, 1872, 2268, 3000, 3120, 3528, 3672, 4050, 4128, ...
8) 2112, 3168, 3360, 5280, 7128, 7560, 9000, 12240, 13680, 16632, ...
9) 1152, 2592, 2688, 4800, 7488, 9720, 18048, 29760, 34848, 35280, ...
10) 14592, 21600, 22272, 29568, 32832, 33600, 64152, 71808, 75168, ...
11) 26112, 26880, 49920, 81648, 100800, 102912, 108288, 131712, ...
12) 15360, 23040, 58368, 95232, 133632, 134400, 196992, 219648, ...
13) 139968, 235008, 241920, 279552, 365568, 472392, 617472, 694272, ...
14) 138240, 202752, 345600, 684288, 724992, 783360, 817152, 875520, ...
... (End)
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ Last /@ FactorInteger@n; p = 3; lst = {}; While[p < 1000, If[ PrimeQ[p + 2], AppendTo[lst, f[p + 1]]]; p = NextPrime@p]: lst (* Robert G. Wilson v, Aug 02 2010 *)

Formula

a(n) = A001222(A014574(n)).

A092146 Primes of the form p + 10 where p is a prime.

Original entry on oeis.org

13, 17, 23, 29, 41, 47, 53, 71, 83, 89, 107, 113, 137, 149, 167, 173, 191, 233, 239, 251, 281, 293, 317, 347, 359, 383, 389, 419, 431, 443, 449, 467, 509, 557, 587, 617, 641, 653, 683, 701, 719, 743, 761, 797, 821, 839, 863, 887, 929, 947, 977, 1019, 1031
Offset: 1

Views

Author

Douglas Winston (douglas.winston(AT)srupc.com), Mar 31 2004

Keywords

Crossrefs

Programs

Formula

a(n) = 10 + A023203(n). - Alois P. Heinz, Feb 27 2020

A093514 Transform of the prime sequence by the Rule90 cellular automaton.

Original entry on oeis.org

2, 3, 4, 9, 11, 15, 17, 21, 23, 25, 29, 33, 37, 39, 41, 45, 47, 49, 53, 55, 59, 63, 67, 69, 71, 75, 79, 81, 83, 85, 89, 91, 97, 99, 101, 105, 107, 111, 113, 115, 127, 129, 131, 133, 137, 141, 149, 153, 157, 159, 163, 165, 167, 169, 173, 175, 179, 183, 191, 195, 197, 201
Offset: 1

Views

Author

Ferenc Adorjan (fadorjan(AT)freemail.hu)

Keywords

Comments

As described in A051006, a monotonic sequence can be mapped into a fractional real. Then the binary digits of that real can be treated (transformed) by an elementary cellular automaton. Taken resulted sequence of binary digits as a fractional real, it can be mapped back into a sequence, as in A092855.
n is in this sequence if either n-2 OR n is prime but not both. Similar simple propositional rules can be given for all "RuleXXX" transforms of primes (or any strictly monotone sequence with a well-defined characteristic function) because the idea in these sequences is to take the characteristic function, consider it as an infinite binary word, apply one generation of some one-dimensional cellular automaton rule "XXX" to it and define the new sequence by this characteristic function. - Antti Karttunen, Apr 22 2004
For example, 2 is included because 0 is not prime, but 2 is. 3 is included because 1 is not prime, but 3 is. 4 is included because 2 is prime, although 4 is not. 5 is not included because both 3 and 5 are primes, 9 is included because 7 is prime, but 9 is not.

Crossrefs

Characteristic function for this sequence is A010051(n-2) + A010051(n) (modulo 2). Naturally none of the terms of A006512 occur here.

Programs

  • PARI
    {ca_tr(ca,v)= /* Calculates the Cellular Automaton transform of the vector v by the rule ca */
    local(cav=vector(8),a,r=[],i,j,k,l,po,p=vector(3));
    a=binary(min(255,ca));k=matsize(a)[2];forstep(i=k,1,- 1,cav[k-i+1]=a[i]);
    j=0;l=matsize(v)[2];k=v[l];po=1;
    for(i=1,k+2,j*=2;po=isin(i,v,l,po);j=(j+max(0,sign(po)))% 8;if(cav[j+1],r=concat(r,i)));
    return(r) /* See the function "isin" at A092875 */}

A136016 a(n) = 9*n^2-1.

Original entry on oeis.org

8, 35, 80, 143, 224, 323, 440, 575, 728, 899, 1088, 1295, 1520, 1763, 2024, 2303, 2600, 2915, 3248, 3599, 3968, 4355, 4760, 5183, 5624, 6083, 6560, 7055, 7568, 8099, 8648, 9215, 9800, 10403, 11024, 11663, 12320, 12995, 13688, 14399, 15128, 15875, 16640
Offset: 1

Views

Author

Artur Jasinski, Dec 10 2007

Keywords

Crossrefs

Programs

Formula

a(n) = A005563(3*n-1). - Paul Curtz, Oct 28 2008
a(2*n) = A136017(n). - Paul Curtz, Sep 30 2008
a(n) = A016777(n)*A016789(n-1). - Reinhard Zumkeller, Feb 15 2009
G.f.: x*(-8-11*x+x^2) / ( x-1 )^3. - R. J. Mathar, Jul 01 2011
From Amiram Eldar, Jul 31 2020: (Start)
Sum_{n>=1} 1/a(n) = 1/2 - sqrt(3)*Pi/18.
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(3)*Pi/9 - 1/2. (End)
From Amiram Eldar, Feb 04 2021: (Start)
Product_{n>=1} (1 + 1/a(n)) = 2*Pi/(3*sqrt(3)) (A248897).
Product_{n>=1} (1 - 1/a(n)) = sqrt(2/3)*sin(sqrt(2)*Pi/3). (End)
a(n) = a(-n) for all n in Z. Sum_{n in Z} 1/a(n) = -Pi/3^(3/2) = -A073010. - Michael Somos, May 21 2023
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Wesley Ivan Hurt, Jun 19 2025

A160910 Decimal expansion of c = sum over twin primes (p, p+2) of (1/p^2 + 1/(p+2)^2).

Original entry on oeis.org

2, 3, 7, 2, 5, 1, 7, 7, 6, 5, 7
Offset: 0

Views

Author

William Royle (seriesandsequences(AT)yahoo.com), May 29 2009

Keywords

Comments

Compare Viggo Brun's constant (1/3 + 1/5) + (1/5 + 1/7) + (1/11 + 1/13) + (1/17 + 1/19) + (1/29 + 1/31) + ... (see A065421, A005597).
It appears that c = Sum 1/A001359(n)^2 + 1/A006512(n)^2. - R. J. Mathar, May 30 2009
0.237251776574746 < c < 0.237251776947124. - Farideh Firoozbakht, May 31 2009
c < 0.2725177657771. - Hagen von Eitzen, Jun 03 2009
From Farideh Firoozbakht, Jun 01 2009: (Start)
We can show that a(9)=6, a(10)=5, and a(11) is in the set {7, 8, 9}.
Proof: s1 = 0.237251776576249072... is the sum up to prime(499,000,000) and s2 = 0.237251776576250009... is the sum up to prime(500,000,000).
By using the fact that number of twin primes between the first 10^6*n primes and the first 10^6*(n+1) primes is decreasing (up to the first 2*10^9 primes), we conclude that the sum up to prime(2,000,000,000) is less than s2 + 1500*(s2-s1).
But since s2-s1 < 10^(-15), the sum up to prime(2*10^9) is less than s2 + 1.5*10^(-12) = 0.237251776576250009... + 1.5*10^(-12) = 0.237251776577550009... .
Hence the constant c is less than
0.237251776577550009... + lim(sum(1/k^2,{k, prime(2,000,000,001), n}, n -> infinity)
< 0.237251776577550009... + 2.12514*10^(-11)
< 0.237251776598801409.
So we have 0.237251776576250009 < c < 0.237251776598801409, hence a(9)=6, a(10)=5, and a(11) is in the set {7, 8, 9}.
I guess that a(11)=7. (End)
From Jon E. Schoenfield, Jan 02 2019: (Start)
Given that the Hardy-Littlewood approximation to the number of twin prime pairs < y is
2 * C_2 * Integral_{x=2..y} dx/log(x)^2
where C_2 = 0.660161815846869573927812110014555778432623 (see A152051), we can estimate the size of the tail of the summation Sum(1/A001359(j)^2) + 1/A006512(j)^2) for twin primes > y as
t(y) = 2 * C_2 * Integral_{x>y} 2*dx/(x*log(x))^2.
Let s(y) be the sum of the squares of the reciprocals of all the twin primes <= y, and let s'(y) = s(y) + t(y) be the result of adding to the actual value s(y) the estimated tail size t(y). Evaluating s(y), t(y), and s'(y) at y = 2^d for d = 20..33 gives
.
d s(2^d) t(2^d)*10^10 s(2^d) + t(2^d)
== ==================== ============ ====================
20 0.237251764919808326 115.34589710 0.237251776454398036
21 0.237251771317612979 52.59702970 0.237251776577315949
22 0.237251774173347724 24.08221952 0.237251776581569676
23 0.237251775469086555 11.06766714 0.237251776575853269
24 0.237251776066813995 5.10395459 0.237251776577209454
25 0.237251776340760021 2.36119196 0.237251776576879217
26 0.237251776467109357 1.09553336 0.237251776576662693
27 0.237251776525743797 0.50967952 0.237251776576711749
28 0.237251776552887645 0.23771866 0.237251776576659511
29 0.237251776565549906 0.11113468 0.237251776576663374
30 0.237251776571456873 0.05207020 0.237251776576663892
31 0.237251776574218065 0.02444677 0.237251776576662742
32 0.237251776575513036 0.01149984 0.237251776576663020
33 0.237251776576121140 0.00541938 0.237251776576663078
.
which agrees with all the terms in the Data section and suggests likely values for additional terms.
(End)

Examples

			(1/9 + 1/25) + (1/25 + 1/49) + (1/121 + 1/169) + (1/289 + 1/361) + (1/841 + 1/961) + ... = 0.237251...
		

Crossrefs

Extensions

R. J. Mathar pointed out that the value of c as originally submitted was incorrect (see link). - N. J. A. Sloane, May 31 2009
More terms from Farideh Firoozbakht and Hagen von Eitzen, Jun 01 2009
Name changed by Michael B. Porter, Jan 04 2019

A181491 Primes of the form p = 3*2^k - 1 such that p+2 is also prime.

Original entry on oeis.org

5, 11, 191, 786431
Offset: 1

Views

Author

M. F. Hasler, Oct 30 2010

Keywords

Comments

Sequence A181490 lists the exponents k, sequences A181492 and A181493 the corresponding upper twin prime and their average.
a(5) > 3 * 2 ^ 3000 + 1. - Max Z. Scialabba, Dec 24 2023

Crossrefs

Programs

  • PARI
    for( k=1,999, ispseudoprime(3<
    				

Formula

A181491 = A007283 intersect A014574 = A181492 - 2 = A181493 - 1 = 3*2^A153890 - 1.

A228917 Number of undirected circular permutations i_0, i_1, ..., i_n of 0, 1, ..., n such that i_0+i_1, i_1+i_2, ...,i_{n-1}+i_n, i_n+i_0 are among those k with 6*k-1 and 6*k+1 twin primes.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 5, 2, 12, 39, 98, 526, 2117, 6663, 15043, 68403, 791581, 4826577, 19592777, 102551299, 739788968, 4449585790, 36547266589, 324446266072, 2743681178070
Offset: 1

Views

Author

Zhi-Wei Sun, Sep 08 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
This implies the twin prime conjecture, and it is similar to the prime circle problem mentioned in A051252.
For each n = 2,3,... construct an undirected simple graph T(n) with vertices 0,1,...,n which has an edge connecting two distinct vertices i and j if and only if 6*(i+j)-1 and 6*(i+j)+1 are twin primes. Then a(n) is just the number of Hamiltonian cycles contained in T(n). Thus a(n) > 0 if and only if T(n) is a Hamilton graph.
Zhi-Wei Sun also made the following similar conjectures for odd primes, Sophie Germain primes, cousin primes and sexy primes:
(1) For any integer n > 0, there is a permutation i_0, i_1, ..., i_n of 0, 1, ..., n such that i_0+i_1, i_1+i_2, ..., i_{n-1}+i_n, i_n+i_0 are integers of the form (p-1)/2, where p is an odd prime. Also, we may replace the above (p-1)/2 by (p+1)/4 or (p-1)/6; when n > 4 we may substitute (p-1)/4 for (p-1)/2.
(2) For any integer n > 2, there is a permutation i_0, i_1, ..., i_n of 0, 1,..., n such that i_0+i_1, i_1+i_2, ..., i_{n-1}+i_n, i_n+i_0 are integers of the form (p+1)/6, where p is a Sophie Germain prime.
(3) For any integer n > 3, there is a permutation i_0, i_1, ..., i_n of 0, 1,..., n such that i_0+i_1, i_1+i_2, ..., i_{n-1}+i_n, i_n+i_0 are among those integers k with 6*k+1 and 6*k+5 both prime.
(4) For any integer n > 4, there is a permutation i_0, i_1, ..., i_n of 0, 1,..., n such that i_0+i_1, i_1+i_2, ..., i_{n-1}+i_n, i_n+i_0 are among those integers k with 2*k-3 and 2*k+3 both prime.

Examples

			a(n) = 1 for n = 1,2,3 due to the permutation (0,...,n).
a(4) = 2 due to the permutations (0,1,4,3,2) and (0,2,1,4,3).
a(5) = 2 due to the permutations (0,1,4,3,2,5), (0,3,4,1,2,5).
a(6) = 2 due to the permutations
  (0,1,6,4,3,2,5) and (0,3,4,6,1,2,5).
a(7) = 5 due to the permutations
  (0,1,6,4,3,2,5,7), (0,1,6,4,3,7,5,2), (0,2,1,6,4,3,7,5),
  (0,3,4,6,1,2,5,7), (0,5,2,1,6,4,3,7).
a(8) = 2 due to the permutations
  (0,1,6,4,8,2,3,7,5) and (0,1,6,4,8,2,5,7,3).
a(9) = 12 due to the permutations
  (0,1,6,4,3,9,8,2,5,7), (0,1,6,4,8,9,3,2,5,7),
  (0,1,6,4,8,9,3,7,5,2), (0,2,1,6,4,8,9,3,7,5),
  (0,2,8,9,1,6,4,3,7,5), (0,3,4,6,1,9,8,2,5,7),
  (0,3,9,1,6,4,8,2,5,7), (0,3,9,8,4,6,1,2,5,7),
  (0,5,2,1,6,4,8,9,3,7), (0,5,2,8,4,6,1,9,3,7),
  (0,5,2,8,9,1,6,4,3,7), (0,5,7,3,9,1,6,4,8,2).
a(10) > 0 due to the permutation (0,5,2,3,9,1,6,4,8,10,7).
a(11) > 0 due to the permutation (0,10,8,9,3,7,11,6,4,1,2,5).
a(12) > 0 due to the permutation
        (0, 5, 2, 1, 6, 4, 3, 9, 8, 10, 7, 11, 12).
		

Crossrefs

Programs

  • Mathematica
    (* A program to compute required circular permutations for n = 7. To get "undirected" circular permutations, we should identify a circular permutation with the one of the opposite direction; for example, (0,7,5,2,3,4,6,1) is identical to (0,1,6,4,3,2,5,7) if we ignore direction. Thus a(7) is half of the number of circular permutations yielded by this program. *)
    tp[n_]:=tp[n]=PrimeQ[6n-1]&&PrimeQ[6n+1]
    V[i_]:=Part[Permutations[{1,2,3,4,5,6,7}],i]
    m=0
    Do[Do[If[tp[If[j==0,0,Part[V[i],j]]+If[j<7,Part[V[i],j+1],0]]==False,Goto[aa]],{j,0,7}];
    m=m+1;Print[m,":"," ",0," ",Part[V[i],1]," ",Part[V[i],2]," ",Part[V[i],3]," ",Part[V[i],4]," ",Part[V[i],5]," ",Part[V[i],6]," ",Part[V[i],7]];Label[aa];Continue,{i,1,7!}]

Extensions

a(10)-a(25) from Max Alekseyev, Sep 12 2013

A236097 a(n) = |{0 < k < n-2: p = phi(k) + phi(n-k)/2 + 1, prime(p) - p - 1 and prime(p) - p + 1 are all prime}|, where phi(.) is Euler's totient function.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 2, 2, 1, 3, 1, 1, 2, 2, 3, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 2, 0, 5, 5, 2, 4, 1, 5, 3, 3, 2, 4, 4, 9, 5, 9, 4, 10, 3, 6, 6, 8, 5, 10, 4, 4, 7, 8, 10, 5, 8, 9, 9, 4, 11, 3, 5, 5, 9, 5, 4, 4, 5, 6, 8, 7, 6, 3, 11, 4, 8, 10, 9, 8, 7, 6, 11, 7, 9, 4, 6, 5, 6, 2, 9, 4, 7, 6, 7, 10, 9
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 19 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 31.
This implies that there are infinitely many primes p with {prime(p) - p - 1, prime(p) - p + 1} a twin prime pair.

Examples

			a(20) = 1 since phi(2) + phi(18)/2 + 1 = 5, prime(5) - 5 - 1 = 5 and prime(5) - 5 + 1 = 7 are all prime.
a(36) = 1 since phi(21) + phi(15)/2 + 1 = 17, prime(17) - 17 - 1 = 41 and prime(17) - 17 + 1 = 43 are all prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[n]&&PrimeQ[Prime[n]-n-1]&&PrimeQ[Prime[n]-n+1]
    f[n_,k_]:=EulerPhi[k]+EulerPhi[n-k]/2+1
    a[n_]:=Sum[If[p[f[n,k]],1,0],{k,1,n-3}]
    Table[a[n],{n,1,100}]

A237130 Number of ordered ways to write n = k + m with k > 0 and m > 0 such that both {3*k - 1, 3*k + 1} and {phi(m) - 1, phi(m) + 1} are twin prime pairs, where phi(.) is Euler's totient function.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 2, 1, 3, 2, 2, 3, 3, 3, 2, 3, 3, 3, 2, 3, 4, 3, 3, 1, 3, 4, 4, 3, 3, 5, 5, 3, 2, 2, 3, 4, 2, 3, 5, 5, 3, 4, 4, 5, 3, 5, 2, 3, 4, 4, 4, 2, 6, 4, 3, 4, 3, 5, 1, 5, 5, 5, 4, 2, 5, 4, 4, 2, 4, 6, 5, 6, 3, 5, 5, 6, 5, 1, 5, 3, 5, 3, 6, 4, 5, 7, 3, 5, 3, 5, 5, 3, 7, 3, 9, 4, 6, 5
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 04 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 8.
(ii) Any integer n > 6 can be written as k + m with k > 0 and m > 0 such that both {prime(k), prime(k) + 2} and {phi(m) - 1, phi(m) + 1} are twin prime pairs.
(iii) Each n = 12, 13, ... can be written as p + q (q > 0) with p, p + 6, phi(q) - 1 and phi(q) + 1 all prime.
(iv) If n > 2 is neither 10 nor 430, then n can be written as k + m with k > 0 and m > 0 such that both {3k - 1, 3*k + 1} and {6*m - 1, 6*m + 1} are twin prime pairs.
Note that each part of the above conjecture implies the twin prime conjecture.

Examples

			a(7) = 1 since 7 = 2 + 5 with 3*2 - 1 = 5, 3*2 + 1 =7, phi(5) - 1 = 3 and phi(5) + 1 = 5 all prime.
a(140) = 1 since 140 = 104 + 36 with 3*104 - 1 = 311, 3*104 + 1 = 313, phi(36) - 1 = 11 and phi(36) + 1 = 13 all prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=PrimeQ[EulerPhi[n]-1]&&PrimeQ[EulerPhi[n]+1]
    a[n_]:=Sum[If[PrimeQ[3k-1]&&PrimeQ[3k+1]&&PQ[n-k],1,0],{k,1,n-1}]
    Table[a[n],{n,1,100}]
Previous Showing 101-110 of 478 results. Next