A367195 Primes p such that (2^(p-1)*(p+1) - 1) / p is prime.
3, 5, 7, 11, 19, 29, 41, 61, 137, 181, 293, 11171
Offset: 1
Extensions
a(12) from Michael S. Branicky, Nov 09 2023
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.
M. Farrokhi D. G.'s wiki page.
M. Farrokhi D. G. has authored 19 sequences. Here are the ten most recent ones:
a(0) = 1 for GCD(1 + 0, 1) = 1. a(1) = 3 for GCD(1 + 1, 3) = GCD(3 + 1, 3) = 1 but GCD(1 + 1, 2) > 1. a(2) = 91 for GCD(d + 2, 91) = 1 for all divisors d = 1, 7, 13, 91 of 91, GCD(13 + 1, 91) > 1, and 91 is the smallest number with this property.
isds(k,s)={fordiv(k,d,if(gcd(d+s, k)<>1, return(0))); 1} findds(k)={for(s=0, k-1, if(isds(k,s), return(s))); -1} a(n)={for(k=1, oo, if(isds(k,n) && findds(k)==n, return(k)))} \\ Andrew Howroyd, Oct 05 2023
1 is a term since GCD(1 + 0, 1) = 1. 2 is not a term since GCD(1 + s, 2) > 1 or GCD(2 + s, 2) > 1 for all nonnegative integers s. 3 is a term since GCD(1 + 1, 3) = GCD(3 + 1, 3) = 1.
CoprimeDivisorShift := function(n) local shift, divisors; shift := 0; if not IsPrimeInt(n) and First(PrimeDivisors(n), p -> CoprimeDivisorShift(n / p) = infinity) <> fail then shift := infinity; fi; if shift < infinity then divisors := DivisorsInt(n); while shift < n and First(divisors, d -> GcdInt(d + shift, n) > 1) <> fail do shift := shift + 1; od; if shift = n then shift := infinity; fi; fi; return shift; end;
aList := proc(len) local isds, findds; isds := (k, s) -> andmap(d -> igcd(d + s, k) = 1, NumberTheory:-Divisors(k)); findds := k -> ormap(s -> isds(k, s), [seq(1..k)]); select(k -> findds(k), [seq(1..len)]) end: aList(133); # Peter Luschny, Oct 06 2023 # More efficient, after David A. Corneth: isa := proc(n) local d, p, t; p := 3; if irem(n, 2) = 0 then return false fi; d := NumberTheory:-Divisors(n); while p < nops(d) do {seq(irem(t, p), t = d)}; if nops(%) = p then return false fi; p := nextprime(p); od: true end: aList := len -> select(isa, [seq(1..len)]): aList(145); # Peter Luschny, Oct 07 2023
isa[n_] := Module[{d, p, t}, p = 3; If[Mod[n, 2] == 0, Return[False]]; d = Divisors[n]; While[p < Length[d], If[Length[Union@Table[Mod[t, p], {t, d}]] == p, Return[False]]; p = NextPrime[p]]; True]; aList[len_] := Select[Range[len], isa]; aList[145] (* Jean-François Alcover, Oct 27 2023, after Peter Luschny *)
isds(k,s)={fordiv(k, d, if(gcd(d+s, k)<>1, return(0))); 1} findds(k)={for(s=1, k, if(isds(k,s), return(s))); 0} select(k->findds(k), [1..150]) \\ Andrew Howroyd, Oct 05 2023
is(n) = { if(!bitand(n, 1), return(0)); my(d = divisors(n)); forprime(p = 3, #d, if(#Set(d % p) == p, return(0) ) ); 1 } \\ David A. Corneth, Oct 06 2023
The prime 127 is in the sequence because the only expressions of 127 as concatenation of smaller numbers are 1 U 2 U 7, 1 U 27, and 12 U 7 (in base 10) but 1 and 12 are not primes. The prime 271 is not in the sequence because it is the concatenation of primes 2 and 71 (in base 10). The prime 307 is not in the sequence because it is the concatenation of primes 3 and 07 (in base 10).
Select[Prime@Range@100,Union[And@@@PrimeQ[FromDigits/@#&/@Union@Select[Flatten[Permutations/@Subsets[Most@Rest@Subsequences[d=IntegerDigits@#]],1],Flatten@#==d&]]]=={False}||Length@d==1&] (* Giorgos Kalogeropoulos, Oct 15 2021 *)
from sympy import isprime, primerange def cond(n): # n is not a concatenation of smaller primes if n%10 in {4, 6, 8}: return True d = str(n) for i in range(1, len(d)): if isprime(int(d[:i])): if isprime(int(d[i:])) or not cond(int(d[i:])): return False return True def aupto(lim): return [p for p in primerange(2, lim+1) if cond(p)] print(aupto(490)) # Michael S. Branicky, Oct 15 2021
P(C_6) = 1*2*3*3*6*6 = 648.
Product(List(G, Order))
psi(C_6) = 1 + 2 + 3 + 3 + 6 + 6 = 21.
Sum(List(G, Order));
l := Filtered(Set(List(Cartesian([1..21], [1..21]), x -> Fibonacci(x[1] * x[2])/Fibonacci(x[1]))), x -> x < 10000);; Filtered([1..10000], x -> not x in l);
phi(57) = 5 * 7 + 1 phi(195) = 1 * 95 + 1 = 19 * 5 + 1 phi(319) = 31 * 9 + 1 phi(5595) = 5 * 595 + 1 phi(11709) = 11 * 709 + 1 phi(77097) = 7 * 7097 + 1 phi(114765) = 11 * 4765 + 1 phi(1313667) = 1313 * 667 + 1 phi(1348559) = 134855 * 9 + 1 phi(4752465) = 47 * 52465 + 1 phi(10219099) = 1021 * 9099 + 1 phi(11031119) = 1103111 * 9 + 1 phi(185573199) = 185 * 573199 + 1
seqQ[n_] := Module[{d = IntegerDigits[n]}, MemberQ[Times @@@ Table[FromDigits /@ {Take[d, k], Take[d, -Length[d] + k]}, {k, 1, Length[d] - 1}], EulerPhi[n] - 1]]; Select[Range[10, 10^5], seqQ] (* Amiram Eldar, Jul 11 2020 *)
isok(m) = {my(tm=eulerphi(m)-1, d=digits(m)); for (i=1, #d-1, if (fromdigits(vector(i, k, d[k]))*fromdigits(vector(#d-i, k, d[i+k])) == tm, return(1)););} \\ Michel Marcus, Jul 11 2020
Comments