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.

Showing 1-5 of 5 results.

A346468 a(n) = (n-1) / A346467(n).

Original entry on oeis.org

0, 1, 1, 3, 1, 5, 1, 7, 2, 9, 1, 11, 1, 13, 7, 15, 1, 17, 1, 19, 1, 21, 1, 23, 2, 25, 13, 27, 1, 29, 1, 31, 2, 33, 17, 35, 1, 37, 19, 39, 1, 41, 1, 43, 1, 45, 1, 47, 1, 49, 5, 51, 1, 53, 3, 55, 2, 57, 1, 59, 1, 61, 31, 63, 4, 65, 1, 67, 17, 69, 1, 71, 1, 73, 37, 75, 19, 77, 1, 79, 1, 81, 1, 83, 1, 85, 43, 87, 1, 89
Offset: 1

Views

Author

Antti Karttunen and Thomas Ordowski, Jul 22 2021

Keywords

Comments

Numbers n such that a(n) = 1 are A248614(m)+1 for m > 0. These are all primes together with A317210. The set of these numbers has zero asymptotic density.

Crossrefs

Programs

  • Mathematica
    {0}~Join~Array[#/CarmichaelLambda@ Denominator@ BernoulliB@ # &, 89] (* Michael De Vlieger, Nov 23 2021 *)
  • PARI
    A346468(n) = if(1==n,0,my(m=1); fordiv(n-1,d,if(isprime(1+d),m = lcm(m,d))); ((n-1)/m));

Formula

a(n) = (n-1) / A346467(n).
a(n) = (n-1) / A002322(A027642(n-1)).

A346481 a(n) = A346467(n) / A346466(n) = lcm S / lcm {d in S, d+1 | n}, with S = {d | n-1, d+1 is prime}.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 8, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 8, 1, 5, 1, 1, 1, 18, 1, 14, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 40, 1, 1, 1, 21, 1, 1, 1, 1, 1, 15, 1, 46, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13
Offset: 1

Views

Author

Antti Karttunen, Jul 31 2021

Keywords

Crossrefs

Programs

  • PARI
    A346481(n) = if(1==n,n,my(m1=1,m2=1); fordiv(n-1,d,if(isprime(1+d), m1 = lcm(m1,d); if(!(n%(1+d)), m2 = lcm(m2,d)))); (m1/m2));

Formula

a(n) = A346467(n) / A346466(n).

A067513 Number of divisors d of n such that d+1 is prime.

Original entry on oeis.org

1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 5, 1, 2, 1, 4, 1, 4, 1, 4, 1, 3, 1, 5, 1, 2, 1, 4, 1, 5, 1, 4, 1, 2, 1, 7, 1, 2, 1, 5, 1, 4, 1, 4, 1, 3, 1, 6, 1, 3, 1, 4, 1, 4, 1, 4, 1, 3, 1, 8, 1, 2, 1, 4, 1, 5, 1, 3, 1, 4, 1, 8, 1, 2, 1, 3, 1, 4, 1, 6, 1, 3, 1, 7, 1, 2, 1, 5, 1, 6, 1, 4, 1, 2, 1, 7, 1, 2, 1, 5, 1, 4, 1
Offset: 1

Views

Author

Amarnath Murthy, Feb 12 2002

Keywords

Comments

1, 2 and 4 are the only numbers such that for every divisor d, d+1 is a prime.
These and only these primes appear as prime divisors of any term of InvPhi(n) set if n is not empty, i.e., if n is from A002202. - Labos Elemer, Jun 24 2002
a(n) is the number of integers k such that n = k - k/p where p is one of the prime divisors of k. (See, e.g., A064097 and A333123, which are related to the mapping k -> k - k/p.) - Robert G. Wilson v, Jun 12 2022

Examples

			a(12) = 5 as the divisors of 12 are 1, 2, 3, 4, 6 and 12 and the corresponding primes are 2,3,5,7 and 13. Only 3+1 = 4 is not a prime.
		

Crossrefs

Even-indexed terms give A046886.
Cf. A005408 (positions of 1's), A051222 (of 2's).

Programs

  • Haskell
    a067513 = sum . map (a010051 . (+ 1)) . a027750_row
    -- Reinhard Zumkeller, Jul 31 2012
    
  • Maple
    A067513 := proc(n)
        local a,d;
        a := 0 ;
        for d in numtheory[divisors](n) do
            if isprime(d+1) then
                a := a+1 ;
            end if;
        end do:
        a ;
    end proc:
    seq(A067513(n),n=1..100) ; # R. J. Mathar, Aug 07 2022
  • Mathematica
    a[n_] := Length[Select[Divisors[n]+1, PrimeQ]]
    Table[Count[Divisors[n],?(PrimeQ[#+1]&)],{n,110}] (* _Harvey P. Dale, Feb 29 2012 *)
    a[n_] := DivisorSum[n, 1 &, PrimeQ[# + 1] &]; Array[a, 100] (* Amiram Eldar, Jan 11 2025 *)
  • PARI
    a(n)=sumdiv(n,d,isprime(d+1)) \\ Charles R Greathouse IV, Dec 23 2011
    
  • Python
    from sympy import divisors, isprime
    def a(n): return sum(1 for d in divisors(n, generator=True) if isprime(d+1))
    print([a(n) for n in range(1, 104)]) # Michael S. Branicky, Jul 12 2022

Formula

a(n) = 2 iff Bernoulli number B_{n} has denominator 6 (cf. A051222). - Vladeta Jovovic, Feb 13 2002
a(n) <= A141197(n). - Reinhard Zumkeller, Oct 06 2008
a(n) = A001221(A027760(n)). - Enrique Pérez Herrero, Dec 23 2011
a(n) = Sum_{k = 1..A000005(n)} A010051(A027750(n,k)+1). - Reinhard Zumkeller, Jul 31 2012
a(n) = A001221(A185633(n)) = A001222(A322312(n)). - Antti Karttunen, Jul 12 2022
Sum_{k=1..n} a(k) = n * (log(log(n)) + B) + O(n/log(n)), where B is a constant (Prachar, 1955). - Amiram Eldar, Jan 11 2025

Extensions

Edited by Dean Hickerson, Feb 12 2002

A346466 The least common multiple of all divisors d of n-1 such that d+1 is a prime divisor of n; a(1) = 1.

Original entry on oeis.org

1, 1, 2, 1, 4, 1, 6, 1, 2, 1, 10, 1, 12, 1, 2, 1, 16, 1, 18, 1, 2, 1, 22, 1, 4, 1, 2, 1, 28, 1, 30, 1, 2, 1, 1, 1, 36, 1, 2, 1, 40, 1, 42, 1, 4, 1, 46, 1, 6, 1, 2, 1, 52, 1, 1, 1, 2, 1, 58, 1, 60, 1, 2, 1, 4, 1, 66, 1, 2, 1, 70, 1, 72, 1, 2, 1, 1, 1, 78, 1, 2, 1, 82, 1, 4, 1, 2, 1, 88, 1, 6, 1, 2, 1, 1, 1, 96, 1, 2, 1, 100, 1, 102, 1, 4
Offset: 1

Views

Author

Antti Karttunen, Jul 19 2021

Keywords

Examples

			From _M. F. Hasler_, Nov 23 2021: (Start)
For n = 2, the only prime factor of n is p = 2, and p-1 = 1 divides n-1 = 1, therefore a(2) = LCM { 1 } = 1.
For n = 35, the prime factors of n are p = 5 and p = 7; but neither 5-1 = 4 nor 7-1 = 6 divides n-1 = 34, therefore a(35) = LCM {} = 1. (End)
		

Crossrefs

Cf. also A173614, A346467.

Programs

  • PARI
    A346466(n) = lcm(apply(p->if((n-1)%(p-1),1,(p-1)), factor(n)[, 1]));
    
  • PARI
    A346466(n) = if(1==n,n,my(m=1); fordiv(n-1,d,if(isprime(1+d)&&!(n%(1+d)),m = lcm(m,d))); (m));
    
  • PARI
    apply( {A346466(n)=lcm([p-1|p<-factor(n)[,1],(n-1)%(p-1)==0])}, [1..99]) \\ M. F. Hasler, Nov 23 2021

Formula

a(n) = LCM_{p-1|n-1, p|n, p prime} (p-1).
a(n) = p-1 for prime powers n = p^e, e >= 1; a(n) = 1 for any even n = 2k. - M. F. Hasler, Nov 23 2021

A343979 Composite numbers m such that lambda(m) = lambda(D_{m-1}), where lambda(n) is the Carmichael function of n (A002322) and D_k is the denominator (A027642) of Bernoulli number B_k.

Original entry on oeis.org

5615659951, 36901698733, 55723044637, 776733036121, 2752403727511, 7725145165297, 14475486778537, 15723055492417, 22824071195485, 29325910221631, 54669159894469, 62086332981241, 125685944708905, 180225455689481, 298620660945331, 335333122310629, 426814989321721
Offset: 1

Views

Author

Amiram Eldar and Thomas Ordowski, May 06 2021

Keywords

Comments

Squarefree composites m such that LCM_{prime p|m} (p-1) = LCM_{prime p, p-1|m-1} (p-1).
Carmichael numbers m such that LCM_{prime p|m} (p-1) = LCM_{prime p, p-1|m-1} (p-1), i.e., with A173614(m) = A346467(m).
Carmichael numbers m such that their index (m-1)/lambda(m) = A346468(m), cf. A174590.
Carl Pomerance noted that, for k = 40826, Chernick's Carmichael number (6k+1)*(12k+1)*(18k+1) = 88189878776579929 satisfies this condition.
Theorem: lambda(m) | lambda(D_{m-1}) if and only if m | D_{m-1}.
Composites m such that lambda(m) | lambda(D_{m-1}) are all Carmichael numbers, defined as composites m such that lambda(m) | m-1, while lambda(D_{m-1}) | m-1 for every m.
Note that if p is prime, then lambda(p) = lambda(D_{p-1}) = p-1.

Crossrefs

Programs

  • Mathematica
    c = Cases[Import["https://oeis.org/A002997/b002997.txt", "Table"], {, }][[;; , 2]]; q[d_] := If[PrimeQ[d + 1], d, 1]; Select[c, LCM @@ (FactorInteger[#][[;; , 1]] - 1) == LCM @@ (q /@ Divisors[# - 1]) &]
  • PARI
    A002322(n) = lcm(znstar(n)[2]); \\ From A002322
    A173614(n) = lcm(apply(p->p-1, factor(n)[, 1]));
    A346467(n) = if(1==n,n,my(m=1); fordiv(n-1,d,if(isprime(1+d),m = lcm(m,d))); (m));
    isA343979(n) = ((n>1) && !isprime(n) && (!((n-1)%A002322(n))) && A173614(n)==A346467(n)); \\ Antti Karttunen, Jul 22 2021
Showing 1-5 of 5 results.