cp's OEIS Frontend

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.

A124240 Numbers n such that lambda(n) divides n, where lambda is Carmichael's function (A002322).

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 16, 18, 20, 24, 32, 36, 40, 42, 48, 54, 60, 64, 72, 80, 84, 96, 100, 108, 120, 126, 128, 144, 156, 160, 162, 168, 180, 192, 200, 216, 220, 240, 252, 256, 272, 288, 294, 300, 312, 320, 324, 336, 342, 360, 378, 384, 400, 420, 432, 440, 468, 480
Offset: 1

Views

Author

Alexander Adamchuk, Oct 22 2006

Keywords

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

Examples

			a(1) = 1 because 1 divides A124239(1) = 1.
a(2) = 2 because 2 divides A124239(2) = 14.
a(3) = 4 because 4 divides A124239(4) = 3704, but 3 does not divide A124239(3) = 197.
		

Crossrefs

Programs

  • 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
    
  • 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 *)
  • 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

Formula

k is in a <=> Clausen(k, 0) divides Clausen(k, 1), (Clausen = A160014). - Peter Luschny, Jun 08 2023

Extensions

New definition from T. D. Noe, Aug 31 2008
Edited by Max Alekseyev, Aug 25 2013