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.

A322976 Number of divisors d of n such that d+2 is prime.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 04 2019

Keywords

Examples

			10395 has 32 divisors: [1, 3, 5, 7, 9, 11, 15, 21, 27, 33, 35, 45, 55, 63, 77, 99, 105, 135, 165, 189, 231, 297, 315, 385, 495, 693, 945, 1155, 1485, 2079, 3465, 10395]. When 2 is added to each, as 1+2 = 3, 3+2 = 5, 5+2 = 7, etc, the only sums that are primes are: [3, 5, 7, 11, 13, 17, 23, 29, 37, 47, 79, 101, 107, 137, 167, 191, 233, 317, 947, 1487, 2081, 3467], thus (a10395) = 22.
		

Crossrefs

Programs

  • Mathematica
    Array[DivisorSum[#, 1 &, PrimeQ[# + 2] &] &, 105] (* Michael De Vlieger, Jan 04 2019 *)
  • PARI
    A322976(n) = sumdiv(n, d, isprime(d+2));

Formula

a(n) = Sum_{d|n} A010051(d+2).
a(A000040(n)) = 1 + A100821(n).

A322978 Number of even divisors d of 2n such that d-1 is prime.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 04 2019

Keywords

Crossrefs

Bisection of A322977.

Programs

  • Mathematica
    Array[DivisorSum[2 #, 1 &, And[EvenQ@ #, PrimeQ[# - 1]] &] &, 105] (* Michael De Vlieger, Jan 04 2019 *)
  • PARI
    A322978(n) = sumdiv(n+n, d, (!(d%2))*isprime(d-1));
    
  • PARI
    A322977(n) = sumdiv(n, d, (!(d%2))*isprime(d-1));
    A322978(n) = A322977(n+n);

Formula

a(n) = A322977(2*n).
a(n) = Sum_{d|(2*n), d>1} A059841(d)*A010051(d-1).

A323156 Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j), where f(n) = A323155(n) for all n, except f(1) = 0.

Original entry on oeis.org

1, 2, 3, 4, 2, 5, 2, 6, 3, 2, 2, 7, 2, 8, 3, 6, 2, 9, 2, 10, 3, 2, 2, 11, 2, 2, 3, 12, 2, 13, 2, 14, 3, 2, 2, 15, 2, 16, 3, 17, 2, 18, 2, 19, 3, 2, 2, 20, 2, 2, 3, 4, 2, 21, 2, 22, 3, 2, 2, 23, 2, 24, 3, 14, 2, 5, 2, 25, 3, 8, 2, 26, 2, 27, 3, 28, 2, 5, 2, 29, 3, 2, 2, 30, 2, 2, 3, 31, 2, 32, 2, 4, 3, 2, 2, 33, 2, 34, 3, 10, 2, 35, 2, 36, 3
Offset: 1

Views

Author

Antti Karttunen, Jan 09 2019

Keywords

Comments

For all i, j:
a(i) = a(j) => A072627(i) = A072627(j),
a(i) = a(j) => A323157(i) = A323157(j) => A322977(i) = A322977(j).

Crossrefs

Cf. A323157, also A322315.

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A323155(n) = { my(m=1); fordiv(n, d, if(isprime(d-1), m *= (d-1)^(1+valuation(n,d-1)))); (m); };
    v323156 = rgs_transform(vector(up_to, n, if(1==n,0,A323155(n))));
    A323156(n) = v323156[n];

A322975 Number of divisors d of n such that d-2 is prime.

Original entry on oeis.org

0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 2, 1, 0, 1, 1, 2, 2, 0, 0, 1, 2, 1, 1, 2, 0, 2, 1, 1, 1, 0, 2, 2, 0, 1, 2, 2, 0, 2, 1, 1, 4, 0, 0, 1, 2, 2, 0, 2, 0, 1, 2, 2, 1, 0, 0, 3, 1, 1, 4, 1, 2, 1, 0, 1, 1, 2, 0, 2, 1, 0, 4, 2, 1, 2, 0, 2, 2, 0, 0, 3, 2, 1, 0, 1, 0, 4, 3, 1, 1, 0, 2, 1, 0, 2, 3, 3, 0, 0, 1, 2, 5
Offset: 1

Views

Author

Antti Karttunen, Jan 04 2019

Keywords

Examples

			10395 has 32 divisors: [1, 3, 5, 7, 9, 11, 15, 21, 27, 33, 35, 45, 55, 63, 77, 99, 105, 135, 165, 189, 231, 297, 315, 385, 495, 693, 945, 1155, 1485, 2079, 3465, 10395]. When 2 is subtracted from each, as 1-2 = -1, 3-2 = 1, 5-2 = 3, etc, the only differences that are primes are: [3, 5, 7, 13, 19, 31, 43, 53, 61, 97, 103, 163, 229, 313, 383, 691, 1153, 1483, 3463], thus (a10395) = 19.
		

Crossrefs

Programs

  • Mathematica
    Array[DivisorSum[#, 1 &, PrimeQ[# - 2] &] &, 105] (* Michael De Vlieger, Jan 04 2019 *)
  • PARI
    A322975(n) = sumdiv(n, d, isprime(d-2));

Formula

a(n) = Sum_{d|n, d>2} A010051(d-2).
a(A000040(n)) = A062301(n).

A323157 Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j), where f(n) = A000265(A323155(n)) for all n, except with f(1) = 0.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 5, 2, 2, 2, 6, 2, 7, 2, 5, 2, 8, 2, 9, 2, 2, 2, 10, 2, 2, 2, 11, 2, 12, 2, 13, 2, 2, 2, 14, 2, 15, 2, 16, 2, 17, 2, 18, 2, 2, 2, 19, 2, 2, 2, 3, 2, 20, 2, 21, 2, 2, 2, 22, 2, 23, 2, 13, 2, 4, 2, 24, 2, 7, 2, 25, 2, 26, 2, 27, 2, 4, 2, 28, 2, 2, 2, 29, 2, 2, 2, 30, 2, 31, 2, 3, 2, 2, 2, 32, 2, 33, 2, 9, 2, 34, 2, 35, 2
Offset: 1

Views

Author

Antti Karttunen, Jan 09 2019

Keywords

Comments

For all i, j:
A305801(i) = A305801(j) => a(i) = a(j),
A323156(i) = A323156(j) => a(i) = a(j),
a(i) = a(j) => A322977(i) = A322977(j).

Crossrefs

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A000265(n) = (n/2^valuation(n, 2));
    A323155(n) = { my(m=1); fordiv(n, d, if(isprime(d-1), m *= (d-1)^(1+valuation(n,d-1)))); (m); };
    A323157aux(n) = if(1==n,0,A000265(A323155(n)));
    v323157 = rgs_transform(vector(up_to, n, A323157aux(n)));
    A323157(n) = v323157[n];
Showing 1-5 of 5 results.