A196127 Union of p-1, 2p-1 and 3p-1 where p is a prime (without repetition).
1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 13, 14, 16, 18, 20, 21, 22, 25, 28, 30, 32, 33, 36, 37, 38, 40, 42, 45, 46, 50, 52, 56, 57, 58, 60, 61, 66, 68, 70, 72, 73, 78, 81, 82, 85, 86, 88, 92, 93, 96, 100, 102, 105, 106, 108, 110, 112, 117, 121, 122, 126, 128, 130
Offset: 1
Links
- Nathaniel Johnston, Table of n, a(n) for n = 1..10000
Programs
-
Maple
lim:=70: S:={}: p:=1: for n from 1 to lim do p:=nextprime(p): S := S union {p-1,2*p-1,3*p-1}: od: op(1..lim,S); # Nathaniel Johnston, Sep 28 2011
-
Mathematica
With[{upto=130},Select[{#-1,2#-1,3#-1}&/@Prime[Range[PrimePi[upto]+1]]//Flatten//Union,#<=upto&]] (* Harvey P. Dale, Apr 22 2016 *) (* or *) Select[Range@130, Or @@ PrimeQ[(#+1)/{1,2,3}] &] (* Giovanni Resta, Apr 30 2019 *)
Extensions
Entries checked by R. J. Mathar, Sep 28 2011