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-4 of 4 results.

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

A185208 Numbers having no divisors d > 1 such that d + 1 are prime powers.

Original entry on oeis.org

1, 5, 11, 13, 17, 19, 23, 25, 29, 37, 41, 43, 47, 53, 55, 59, 61, 65, 67, 71, 73, 79, 83, 85, 89, 95, 97, 101, 103, 107, 109, 113, 115, 121, 125, 131, 137, 139, 143, 145, 149, 151, 157, 163, 167, 169, 173, 179, 181, 185, 187, 191, 193, 197, 199, 205, 209
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 01 2012

Keywords

Comments

A141197(a(n)) = A049073(a(n)) = 1.
Contains all primes except for 2 and Mersenne primes A000668. - Jon Perry, Nov 11 2012
A composite number is in the sequence iff all its factors are. - Jon Perry, Nov 11 2012

Crossrefs

Programs

  • Haskell
    a185208 n = a185208_list !! (n-1)
    a185208_list =  filter ((== 1) . a141197) [1..]
  • Mathematica
    Select[Range[210], Select[Divisors[#] // Rest, PrimeNu[# + 1] == 1 &] == {} &] (* Jean-François Alcover, Aug 17 2013 *)

A049073 LCM of all divisors of d of n such that d+1 is a prime power.

Original entry on oeis.org

1, 2, 3, 4, 1, 6, 7, 8, 3, 10, 1, 12, 1, 14, 15, 16, 1, 18, 1, 20, 21, 22, 1, 24, 1, 26, 3, 28, 1, 30, 31, 16, 3, 2, 7, 36, 1, 2, 3, 40, 1, 42, 1, 44, 15, 46, 1, 48, 7, 10, 3, 52, 1, 18, 1, 56, 3, 58, 1, 60, 1, 62, 63, 16, 1, 66, 1, 4, 3, 70, 1, 72, 1, 2, 15, 4, 7, 78, 1, 80, 3, 82, 1, 84, 1
Offset: 1

Views

Author

David E. Daykin

Keywords

Comments

a(A185208(n)) = 1. - Reinhard Zumkeller, Nov 01 2012

Crossrefs

Programs

  • Haskell
    a049073 = foldl lcm 1 . filter ((== 1) . a010055 . (+ 1)) . a027750_row
    -- Reinhard Zumkeller, Nov 01 2012
  • Mathematica
    a[n_] := LCM @@ Select[Divisors[n], PrimeNu[# + 1] == 1 &]; Table[a[n], {n, 1, 85}] (* Jean-François Alcover, Aug 17 2013 *)

Extensions

More terms from Erich Friedman, Jun 03 2001

A141198 a(n) is the number of divisors of n that are each one more than a power of a prime.

Original entry on oeis.org

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

Views

Author

Leroy Quet, Jun 12 2008

Keywords

Comments

1 is considered here to be a power of a prime. 0 is not considered here to be a power of a prime.

Examples

			The divisors of 9 are 1, 3 and 9. 1 is one more than 0, not a power of a prime. 3 is one more than 2, a power of a prime. And 9 is one more than 8, a power of a prime. There are therefore 2 such divisors that are each one more than a power of a prime. So a(9) = 2.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[n, 1 &, # == 2 || PrimePowerQ[#-1] &]; Array[a, 100] (* Amiram Eldar, Jun 22 2025 *)
  • PARI
    a(n) = sumdiv(n, d, d == 2 || isprimepower(d - 1)); \\ Amiram Eldar, Jun 22 2025

Extensions

Corrected and extended by Diana L. Mecum, Jul 05 2007
Showing 1-4 of 4 results.