OFFSET
1,2
COMMENTS
Numbers n such that A124239(n) is divisible by n.
If k is in the sequence then 2k is also in the sequence, but if 2m is in the sequence m is not necessarily a term of the sequence.
This sequence is a subsequence of A068563. The first term that is different is A068563(27) = 136. The terms of A068563 that are not the terms of a(n) are listed in A124241.
Also, the sequence of numbers n such that p-1 divides n for all primes p that divide n. - Leroy Quet, Jun 27 2008
Numbers n such that b^n == 1 (mod n) for every b coprime to n. - Thomas Ordowski, Jun 23 2017
Numbers m such that every divisor < m is the difference between two divisors of m. - Michel Lagneau, Aug 11 2017
All terms > 1 in this sequence are even. Furthermore, either 4 or 6 divides a(n) for n > 3. 1806 is the largest squarefree term. - Paul Vanderveen, Apr 24 2022
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
Alexander Kalmynin, On Novák numbers, arXiv:1611.00417 [math.NT], 2016. See Theorem 6 p. 11 where these numbers are called Novák-Carmichael numbers.
Eric Weisstein's World of Mathematics, Carmichael Function
FORMULA
k is in a <=> Clausen(k, 0) divides Clausen(k, 1), (Clausen = A160014). - Peter Luschny, Jun 08 2023
EXAMPLE
MAPLE
a:= proc(n) option remember; local k;
for k from `if`(n=1, 0, a(n-1))+1 while
irem(k, numtheory[lambda](k))>0 do od: k
end:
seq(a(n), n=1..100); # Alois P. Heinz, Jul 04 2021
# Using function 'Clausen' from A160014:
aList := m -> select(k -> irem(Clausen(k, 1), Clausen(k, 0)) = 0, [seq(1..m)]):
aList(480); # Peter Luschny, Jun 08 2023
MATHEMATICA
Do[f=n + Sum[ (2k-1)((2k-1)^n-1) / (2(k-1)), {k, 2, n} ]; If[IntegerQ[f/n], Print[n]], {n, 1, 900}]
Flatten[Position[Table[n/CarmichaelLambda[n], {n, 440}], _Integer]] (* T. D. Noe, Sep 11 2008 *)
PROG
(Haskell)
a124240 n = a124240_list !! (n-1)
a124240_list = filter
(\x -> all (== 0) $ map ((mod x) . pred) $ a027748_row x) [1..]
-- Reinhard Zumkeller, Aug 27 2013
(PARI) is(n)=n%lcm(znstar(n)[2])==0 \\ Charles R Greathouse IV, Feb 11 2015
(Python)
from itertools import islice, count
from sympy.ntheory.factor_ import reduced_totient
def A124240gen(): return filter(lambda n:n % reduced_totient(n) == 0, count(1))
A124240_list = list(islice(A124240gen(), 20)) # Chai Wah Wu, Dec 11 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Alexander Adamchuk, Oct 22 2006
EXTENSIONS
New definition from T. D. Noe, Aug 31 2008
Edited by Max Alekseyev, Aug 25 2013
STATUS
approved