login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A274445 a(n) is the smallest composite squarefree number k such that (p+n) | (k-1) for every prime p dividing k. 4

%I #37 Jul 09 2020 08:58:58

%S 385,91,65,451,33,170171,145,1261,161,78409,469,294061,649,13051,1921,

%T 5251,721,8453501,145,300243,1121,47611,3601,1915801,1057,41311,545,

%U 5671,1261,19723133,4321,37759,6913,451,4033,102821,1513,40891,11521,1259497,721,364781,145

%N a(n) is the smallest composite squarefree number k such that (p+n) | (k-1) for every prime p dividing k.

%H Jinyuan Wang, <a href="/A274445/b274445.txt">Table of n, a(n) for n = 1..100</a>

%e For n=1, prime factors of 385 are 5, 7 and 11. (385 - 1)/(5 + 1) = 384/6 = 64, (385 - 1)/(7 + 1) = 384/8 = 48 and (385 - 1)/(11 + 1) = 384/12 = 32.

%e For n=2, prime factors of 91 are 7 and 13. (91 - 1)/(7 + 2) = 90/9 = 10 and (91 - 1)/(13 + 2) = 90/15 = 6.

%p with(numtheory); P:=proc(q) local d,k,n,ok,p;

%p for k from 1 to q do for n from 2 to q do

%p if not isprime(n) and issqrfree(n) then p:=ifactors(n)[2]; ok:=1;

%p for d from 1 to nops(p) do

%p if not type((n-1)/(p[d][1]+k),integer) then ok:=0; break; fi; od;

%p if ok=1 then print(n); break; fi; fi; od; od; end: P(10^9);

%t t = Select[Range[10^6], SquareFreeQ@ # && CompositeQ@ # &]; Table[ SelectFirst[t, Function[k, AllTrue[First /@ FactorInteger@ k, Divisible[k - 1, # + n] &]]], {n, 17}] (* _Michael De Vlieger_, Jun 24 2016, Version 10 *)

%o (PARI) isok(k,n)=if (! issquarefree(k), return (0)); vp = factor(k) [,1]; if (#vp == 1, return (0)); for (i=1, #vp, if ((k-1) % (n+vp[i]), return (0));); 1;

%o a(n) = my(k=2); while (! isok(k,n), k++); k; \\ _Michel Marcus_, Jun 28 2016

%Y Cf. A208728, A225702-A225720, A226020, A226111-A226114, A226364, A226448, A228299-A228302, A229273-A229276, A229321-A229324, A274443, A274444, A274446.

%K nonn

%O 1,1

%A _Paolo P. Lava_, Jun 23 2016

%E a(18), a(24), a(30) added by _Giovanni Resta_, Jun 23 2016

%E More terms from _Michel Marcus_, Jun 28 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 10:01 EDT 2024. Contains 371967 sequences. (Running on oeis4.)