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.

Showing 1-3 of 3 results.

A077065 Semiprimes of form prime - 1.

Original entry on oeis.org

4, 6, 10, 22, 46, 58, 82, 106, 166, 178, 226, 262, 346, 358, 382, 466, 478, 502, 562, 586, 718, 838, 862, 886, 982, 1018, 1186, 1282, 1306, 1318, 1366, 1438, 1486, 1522, 1618, 1822, 1906, 2026, 2038, 2062, 2098, 2206, 2446, 2458, 2578, 2818, 2878, 2902
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 23 2002

Keywords

Comments

There are 670 semiprimes of form prime-1 below 10^5.

Examples

			A001358(16) = 46 = 2*23 is a term as 46 = A000040(15) - 1 = 47 - 1.
		

Crossrefs

Intersection of A006093 and A001358.
Intersection of A006093 and A100484.

Programs

  • Haskell
    a077065 n = a077065_list !! (n-1)
    a077065_list = filter ((== 1) . a010051' . (`div` 2)) a006093_list
    -- Reinhard Zumkeller, Nov 22 2013, Oct 27 2012
    
  • Magma
    IsSemiprime:=func; [s: n in [2..500] | IsSemiprime(s) where s is NthPrime(n)-1]; // Vincenzo Librandi, Oct 17 2012
    
  • Maple
    q:= n-> (n::even) and andmap(isprime, [n+1, n/2]):
    select(q, [$1..5000])[];  # Alois P. Heinz, Jul 19 2023
  • Mathematica
    Select[Range[6000],Plus@@Last/@FactorInteger[#]==2&&PrimeQ[#+1]&] (* Vladimir Joseph Stephan Orlovsky, May 08 2011 *)
    Select[Range[3000],PrimeOmega[#]==2&&PrimeQ[#+1]&] (* Harvey P. Dale, Oct 16 2012 *)
    Select[ Prime@ Range@ 430 - 1, PrimeOmega@# == 2 &] (* Robert G. Wilson v, Feb 18 2014 *)
  • PARI
    [x-1|x<-primes(10^4),bigomega(x-1)==2] \\ Charles R Greathouse IV, Nov 22 2013

Formula

a(n) = A005385(n) - 1 = 2*A005384(n).
A010051(A006093(a(n))/2) = A064911(A006093(a(n))) = 1. - Reinhard Zumkeller, Nov 22 2013
a(n) = A077068(n) - A232342(n). - Reinhard Zumkeller, Dec 16 2013
a(n) = A000010(A194593(n+1)). - Torlach Rush, Aug 23 2018
A000010((a(n)*2)+2) = A023900((a(n)*2)+2). - Torlach Rush, Aug 23 2018

A176045 Numbers n such that n-1 and 2*n-1 are both prime.

Original entry on oeis.org

3, 4, 6, 12, 24, 30, 42, 54, 84, 90, 114, 132, 174, 180, 192, 234, 240, 252, 282, 294, 360, 420, 432, 444, 492, 510, 594, 642, 654, 660, 684, 720, 744, 762, 810, 912, 954, 1014, 1020, 1032, 1050, 1104, 1224, 1230, 1290, 1410, 1440, 1452, 1482, 1500, 1512, 1560
Offset: 1

Views

Author

Michel Lagneau, Apr 07 2010

Keywords

Comments

Also numbers n such that all eigenvalues of the n X n matrix M_n defined in A176043 are prime. The eigenvalues are 2*n-1, and n-1 with multiplicity n-1.
a(n)^2 = p^2 + q, where both p and q are primes. These are the only squares of this form, and which always yields q > p with a(n) - 1 = p = A005384(n) and 2*a(n) - 1 = q = A005385(n), for the same n. Also: a(n) = q - p; p + q + a(n) = 2q = A194593(n+1); and p*q = A156592 - Richard R. Forberg, Mar 04 2015

Examples

			6-1 = 5 and 2*6-1 = 11 are both prime, so 6 is in the sequence. 7-1 = 6 and 2*7-1 = 13 are not both prime, so 7 is not in the sequence.
p = 3, q = 7; p^2 + q = 16, a(n) = sqrt(16) = 4. - _Richard R. Forberg_, Mar 04 2015
		

Crossrefs

Cf. A176043, A005384 (Sophie Germain primes), A005385 (Safe Primes), A124485 (2*n-1 and 4*n-1 are prime).

Programs

  • Magma
    [ n: n in [2..1600] | IsPrime(n-1) and IsPrime(2*n-1) ]; // Klaus Brockhaus, Apr 19 2010
    
  • Maple
    with(numtheory):for n from 2 to 2000 do:if type((2*n-1),prime)=true and type((n-1),prime)=true then print(n):else fi:od:
  • Mathematica
    Select[Prime[Range[250]],PrimeQ[2#+1]&]+1 (* Harvey P. Dale, Jul 31 2013 *)
  • PARI
    isok(n) = isprime(n-1) && isprime(2*n-1); \\ Michel Marcus, Apr 06 2016

Formula

a(n) = A005384(n)+1.
a(n) = 2*A124485(n-1) for n > 1.

Extensions

Edited and 1482 inserted by Klaus Brockhaus, Apr 19 2010

A320391 Numbers k such that phi(k - 2) = phi(k) - 2.

Original entry on oeis.org

5, 7, 8, 13, 14, 16, 19, 20, 22, 31, 43, 46, 61, 64, 73, 94, 103, 109, 118, 139, 151, 166, 181, 193, 199, 214, 229, 241, 256, 271, 283, 313, 334, 349, 358, 421, 433, 454, 463, 523, 526, 571, 601, 619, 643, 661, 694, 718, 766, 811, 823, 829, 859, 883, 934, 958
Offset: 1

Views

Author

Vincenzo Librandi, Oct 13 2018

Keywords

Examples

			7 is in the sequence because phi(5) = 4 = phi(7) - 2.
8 is in the sequence because phi(6) = 2 = phi(8) - 2.
9 is not in the sequence because phi(7) = 6 but phi(9) - 2 = 4 instead.
		

Crossrefs

Cf. A001838. Contains A006512 and terms > 10 in A194593.

Programs

  • GAP
    Filtered([1..960],k->Phi(k-2)=Phi(k)-2); # Muniru A Asiru, Oct 28 2018
  • Magma
    [n: n in [3..1000] | EulerPhi(n-2) eq EulerPhi(n)-2];
    
  • Maple
    with(numtheory): select(k->phi(k-2)=phi(k)-2,[$1..960]); # Muniru A Asiru, Oct 28 2018
  • Mathematica
    Select[Range@1000, EulerPhi@(# - 2) == EulerPhi[#] - 2 &]
    Flatten[Position[Partition[EulerPhi[Range[1000]],3,1],?(#[[1]]==#[[3]]-2&),1,Heads->False]]+2 (* _Harvey P. Dale, Oct 24 2020 *)
  • PARI
    isok(n) = eulerphi(n-2) == eulerphi(n)-2; \\ Michel Marcus, Oct 14 2018
    

Formula

a(n) = A001838(n)+2. - Robert Israel, Oct 30 2018
Showing 1-3 of 3 results.