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.

A072627 Number of divisors d of n such that d-1 is prime.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Jun 28 2002

Keywords

Comments

Inverse Möbius transform of A010051 (when it is shifted one step right). - R. J. Mathar, Jan 25 2009, comment in parenthesis added by Antti Karttunen, Dec 27 2018
If n == 3 (mod 6) then a(n)=1; a(n) = 0 for all other odd n. - Robert Israel, Dec 27 2018

Examples

			n=240: a(240)=12 because primes of -1+d form are: {2,3,5,7,11,19,23,29,47,59,79,239}. These and only these divisors are present in any InvSigma of n, like:InvSig[240]= {114,135,158,177,203,209,239} with {2,3,19,3,5,2,79,3,59,7,29,11,19,239} p-divisors.
		

Crossrefs

Cf. also A067513.

Programs

  • Haskell
    a072627 = length . filter ((== 1) . a010051 . (subtract 1)) . a027749_row
    -- Reinhard Zumkeller, Oct 01 2012
    
  • Maple
    f:= n -> nops(select(t -> isprime(t-1), numtheory:-divisors(n))):
    map(f, [$1..100]); # Robert Israel, Dec 27 2018
  • Mathematica
    di[x_] := Divisors[x] dp[x_] := Part[di[x], Flatten[Position[PrimeQ[ -1+di[x]], True]]]-1 Table[Length[dp[w]], {w, 1, 128}]
    Table[Count[Divisors[n],?(PrimeQ[#-1]&)],{n,110}] (* _Harvey P. Dale, Jul 04 2021 *)
  • PARI
    a(n) = sumdiv(n, d, isprime(d-1)); \\ Michel Marcus, Dec 27 2018

Formula

If p is prime <> 3, then divisors(p)-1 = {1,p}-1 = {0,p-1}, so a(p) = 0.