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!)
A256017 Least integer k > n such that all divisors of n are exactly the first divisors of k in increasing order. 2
2, 4, 9, 8, 25, 18, 49, 16, 27, 50, 121, 156, 169, 98, 75, 32, 289, 54, 361, 100, 147, 242, 529, 696, 125, 338, 81, 196, 841, 930, 961, 64, 363, 578, 245, 1332, 1369, 722, 507, 1640, 1681, 294, 1849, 484, 2115, 1058, 2209, 2544, 343, 250, 867, 676, 2809, 162 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Gcd(n,k) = n and lcm(n,k) = k; a(n)/n is a prime number.
a(n) is alternatively even and odd for n >= 2. A001248 (squares of primes) is a subsequence.
LINKS
Michel Lagneau and Giovanni Resta, Table of n, a(n) for n = 1..10000 (first 600 terms from Michel Lagneau)
FORMULA
For p prime, a(p) = p^2. - Michel Marcus, Jun 02 2015
EXAMPLE
a(6)=18 because the divisors of 6 = {1,2,3,6} are the first divisors of 18 = {1,2,3,6,9,18}.
MAPLE
with(numtheory):nn:=100:
for n from 1 to nn do:
lst0:={}:x:=divisors(n):n0:=nops(x):ii:=0:
for k from 1 to 10^8 while (ii=0) do:
y:=divisors(k):n1:=nops(y):lst1:={}:
if n<>k and n1>=n0 then
for i from 1 to n0 do
lst0:=lst0 union {x[i]}:
od:
for j from 1 to n0 do
lst1:=lst1 union {y[j]}:
od:
if lst0=lst1
then
printf(`%d, `, k):ii:=1:
else fi:fi:
od:
od:
MATHEMATICA
a[n_]:=If[n==1, 2, Block[{k= 2*n, f, d, m}, f = FactorInteger @n; If[1 == Length@f, f[[1, 1]]^(1 + f[[1, 2]]), d = Divisors@ n; m = Length@ d; While[ Take[ Divisors@ k, m] != d, k += n]; k]]]; Array[a, 1000] (* Giovanni Resta, Jun 01 2015 *)
adn[n_]:=Module[{d=Divisors[n], k=n+1, len}, len=Length[d]; While[Length[ Divisors[ k]]<len||Take[Divisors[k], len]!=d, k++]; k]; Array[adn, 60] (* Harvey P. Dale, Mar 05 2020 *)
PROG
(PARI) okd(k, d) = {my(dk = divisors(k)); (#dk >= #d) && (d == vector(#d, i, dk[i])); }
a(n) = {my(k = n+1); my(d = divisors(n)); while (! okd(k, d), k++); k; } \\ Michel Marcus, Jun 02 2015
CROSSREFS
Cf. A001248.
Sequence in context: A033149 A131094 A129598 * A125752 A103147 A340169
KEYWORD
nonn
AUTHOR
Michel Lagneau, Jun 01 2015
STATUS
approved

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 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)