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-10 of 13 results. Next

A322678 Records in A072627.

Original entry on oeis.org

0, 1, 2, 4, 6, 7, 8, 9, 10, 12, 14, 18, 21, 22, 24, 26, 29, 31, 35, 38, 39, 41, 46, 51, 52, 56, 61, 62, 70, 82, 91, 97, 101, 104, 112, 118, 122, 127, 138, 143, 159, 163, 170, 175, 188, 196, 199, 201, 211, 221, 226, 235, 236, 249, 258, 276, 289, 295, 298, 303
Offset: 1

Views

Author

Daniel Suteu, Dec 23 2018

Keywords

Crossrefs

Programs

  • PARI
    r=-1; for(n=1, 10^6, t=sumdiv(n, d, isprime(d-1)); if(t>r, r=t; print1(t, ", ")));

Formula

a(n) = A072627(A322676(n)).

A129308 a(n) is the number of positive integers k such that k*(k+1) divides n.

Original entry on oeis.org

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

Views

Author

Leroy Quet, May 26 2007

Keywords

Comments

The usual OEIS policy is not to include sequences like this where alternate terms are zero; this is an exception.
In other words, a(n) is the number of oblong numbers (A002378) dividing n. - Bernard Schott, Jul 29 2022

Examples

			The divisors of 20 are 1,2,4,5,10,20. Of these there are two that are of the form k(k+1): 2 = 1*2 and 20 = 4*5. So a(2) = 2.
		

Crossrefs

Positions of 0's and 1's are A088725, whose characteristic function is A360128.
First appearance of n is A287142(n), with sorted version A328450.
The longest run of divisors of n has length A055874(n).
One less than A195155.

Programs

  • Mathematica
    a = {}; For[n = 1, n < 90, n++, k = 1; co = 0; While[k < Sqrt[n], If[IntegerQ[ n/(k*(k + 1))], co++ ]; k++ ]; AppendTo[a, co]]; a (* Stefan Steinerberger, May 27 2007 *)
    Table[Count[Differences[Divisors[n]],1],{n,30}] (* Gus Wiseman, Oct 15 2019 *)
  • PARI
    a(n)=sumdiv(n, d, n%(d+1)==0); \\ Michel Marcus, Jan 06 2015
    
  • Python
    from itertools import pairwise
    from sympy import divisors
    def A129308(n): return 0 if n&1 else sum(1 for a, b in pairwise(divisors(n)) if a+1==b) # Chai Wah Wu, Jun 09 2025

Formula

a(2n-1) = 0; a(2n) = A007862(n). - Ray Chandler, Jun 24 2008
G.f.: Sum_{n>=1} x^(n*(n+1))/(1-x^(n*(n+1))). - Joerg Arndt, Jan 30 2011 [modified by Ilya Gutkovskiy, Apr 14 2021]
a(n) = A000005(n) - A137921(n), where A137921(n) is the number of maximal runs of successive divisors of n. - Gus Wiseman, Oct 15 2019
a(n) = Sum_{d|n} A005369(d). - Ridouane Oudra, Jan 22 2021
a(n) = A195155(n)-1. - Antti Karttunen, Feb 21 2023
From Amiram Eldar, Dec 31 2023: (Start)
a(n) = A088722(n) + A059841(n).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1. (End)

Extensions

More terms from Stefan Steinerberger, May 27 2007
Extended by Ray Chandler, Jun 24 2008

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

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 04 2019

Keywords

Comments

Equally: Number of divisors d of n such that d-1 is an odd prime.

Crossrefs

Programs

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

Formula

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

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).

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];

A328450 Numbers that are a smallest number with k pairs of successive divisors, for some k.

Original entry on oeis.org

1, 2, 6, 12, 60, 72, 180, 360, 420, 840, 1260, 2520, 3780, 5040, 13860, 27720, 36960, 41580, 55440, 83160, 166320, 277200, 360360, 471240, 491400, 720720, 1081080, 1113840, 2162160, 2827440, 3341520, 4324320, 5405400, 6126120
Offset: 0

Views

Author

Gus Wiseman, Oct 15 2019

Keywords

Comments

A sorted version of A287142.

Examples

			The divisors of 72 are {1, 2, 3, 4, 6, 8, 9, 12, 18, 24, 36, 72}, with pairs of successive divisors {{1, 2}, {2, 3}, {3, 4}, {8, 9}}, and no smaller number has 4 successive pairs, so 72 belongs to the sequence.
		

Crossrefs

Sorted positions of first appearances in A129308.
The longest run of divisors of n has length A055874(n).
Numbers whose divisors > 1 have no non-singleton runs are A088725.
The Heinz number of the multiset of run-lengths of divisors of n is A328166(n).
The smallest number whose divisors have a longest run of length n is A328449(n).

Programs

  • Mathematica
    dat=Table[Count[Differences[Divisors[n]],1],{n,10000}];
    Sort[Table[Position[dat,i][[1,1]],{i,Union[dat]}]]

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).

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

Original entry on oeis.org

0, 0, 2, 6, 9, 18, 29, 43, 66, 101, 187, 257, 470, 717, 1033, 1293, 2442, 3168, 6011, 7911, 11179, 16888, 32603, 39587, 53063, 79742, 97707, 127679, 246428, 302205, 585129, 670409, 923535, 1385145, 1813935, 2099557, 4091926, 6142573, 8416157
Offset: 1

Views

Author

Ray Chandler, Feb 05 2009

Keywords

Crossrefs

Programs

Formula

a(n) = A072627(A000142(n)).

A322702 a(n) is the product of primes p such that p+1 divides n.

Original entry on oeis.org

1, 1, 2, 3, 1, 10, 1, 21, 2, 1, 1, 330, 1, 13, 2, 21, 1, 170, 1, 57, 2, 1, 1, 53130, 1, 1, 2, 39, 1, 290, 1, 651, 2, 1, 1, 5610, 1, 37, 2, 399, 1, 5330, 1, 129, 2, 1, 1, 2497110, 1, 1, 2, 3, 1, 9010, 1, 273, 2, 1, 1, 10727970, 1, 61, 2, 651, 1, 10, 1, 201, 2
Offset: 1

Views

Author

Daniel Suteu, Dec 23 2018

Keywords

Comments

In general, a(n) is the product of A072627(n) distinct prime factors, with a(n) = 1 iff A072627(n) = 0.

Examples

			For n=12, the divisors of 12 are {1, 2, 3, 4, 6, 12}. The prime numbers p, such that p+1 is a divisor of 12, are {2, 3, 5, 11}, therefore a(12) = 2 * 3 * 5 * 11 = 330.
		

Crossrefs

Programs

  • Maple
    a:= n-> mul(`if`(isprime(d-1), d-1, 1), d=numtheory[divisors](n)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Dec 29 2018
  • Mathematica
    Array[Apply[Times, Select[Divisors@ #, PrimeQ[# - 1] &] - 1 /. {} -> {1}] &, 69] (* Michael De Vlieger, Jan 07 2019 *)
  • PARI
    a(n) = my(d=divisors(n)); prod(k=1, #d, if(isprime(d[k]-1), d[k]-1, 1));

Formula

a(n) = Product_{p prime, p+1 divides n} p.
a(n) = denominator of Sum_{p prime, p+1 divides n} 1/p.
a(n) = Product_{d|n, d-1 is prime} (d-1), where d runs over the divisors of n.
a(2*n + 1) = 2, iff n == 1 (mod 3), else a(2*n + 1) = 1.
A001221(a(n)) = A072627(n). - Antti Karttunen, Jan 12 2019

A341099 Numbers divisible by at least three terms of A008864.

Original entry on oeis.org

12, 18, 24, 30, 32, 36, 40, 42, 48, 54, 56, 60, 64, 72, 80, 84, 88, 90, 96, 102, 104, 108, 112, 114, 120, 126, 128, 132, 136, 138, 140, 144, 150, 152, 156, 160, 162, 168, 174, 176, 180, 186, 192, 196, 198, 200, 204, 208, 210, 216, 220, 222, 224, 228, 234, 240, 248, 252, 256, 258, 264, 270, 272
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Feb 04 2021

Keywords

Comments

Numbers divisible by p+1 for at least three primes p.
Numbers k with A072627(k) >= 3.
Every positive multiple of a term is a term.

Examples

			a(4) = 30 is a term because it is divisible by 2+1=3, 5+1=6 and 29+1=30.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local D;
      D:= convert(numtheory:-divisors(n),list);
      numboccur(true, map(t -> isprime(t-1),D))>= 3
    end proc:
    select(filter, [$1..1000]);
  • Mathematica
    okQ[n_] := DivisorSum[n, Boole[PrimeQ[#-1]]&] >= 3;
    Select[Range[1000], okQ] (* Jean-François Alcover, May 16 2023 *)
  • PARI
    isok(m) = sumdiv(m, d, isprime(d-1)) >= 3; \\ Michel Marcus, Feb 05 2021
Showing 1-10 of 13 results. Next