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 10 results.

A067889 Primes sandwiched between two numbers having same number of divisors.

Original entry on oeis.org

7, 19, 41, 103, 137, 199, 307, 349, 491, 739, 823, 919, 1013, 1061, 1193, 1277, 1289, 1409, 1433, 1447, 1481, 1543, 1609, 1667, 1721, 1747, 2153, 2357, 2441, 2617, 2683, 2777, 3259, 3319, 3463, 3581, 3593, 3769, 3797, 3911, 3943, 4013, 4217, 4423, 4457
Offset: 1

Views

Author

Benoit Cloitre, Mar 02 2002

Keywords

Comments

Primes p such that tau(p+1) = tau(p-1) where tau(k) = A000005(k).
These are the primes in sequence A067888 of numbers n such that tau(n+1) = tau(n-1). - M. F. Hasler, Aug 06 2015

Examples

			7 is a member as 6 and 8 both have 4 divisors; 19 is a member as 18 and 20 both have 6 divisors each.
		

Crossrefs

Cf. A067888, A067891 (analog with sigma).

Programs

  • Maple
    with(numtheory):j := 0:for i from 1 to 10000 do b := ithprime(i): if nops(divisors(b-1))=nops(divisors(b+1)) then j := j+1:a[j] := b:fi:od:seq(a[k],k=1..j);
  • Mathematica
    Prime[ Select[ Range[ 700 ], Length[ Divisors[ Prime[ #1 ] - 1 ]] == Length[ Divisors[ Prime[ #1 ] + 1 ]] & ]]
    Select[Prime[Range[1000]],DivisorSigma[0,#-1]==DivisorSigma[0,#+1]&] (* Harvey P. Dale, Jun 08 2018 *)
  • PARI
    is_A067889(p)=numdiv(p-1)==numdiv(p+1)&&isprime(p) \\ M. F. Hasler, Jul 31 2015

Formula

a(n) seems curiously to be asymptotic to 25*n*log(n). [From the number of terms up to 10^8, 10^9, 10^10 and 10^11, i.e., 306147, 2616930, 22835324 and 202105198, this constant can be estimated by 25.858..., 25.858..., 25.845... and 25.872..., respectively. - Amiram Eldar, Jun 28 2022]

A062832 Numbers k such that k and k+2 have the same number of divisors.

Original entry on oeis.org

3, 5, 6, 8, 11, 17, 18, 29, 33, 40, 41, 50, 54, 55, 59, 71, 85, 91, 93, 101, 102, 107, 123, 128, 136, 137, 141, 143, 149, 152, 159, 179, 182, 183, 184, 185, 191, 197, 198, 201, 203, 213, 215, 217, 219, 227, 230, 235, 239, 242, 243, 246, 247, 248, 265, 269, 281
Offset: 1

Views

Author

Jason Earls, Jul 20 2001

Keywords

Comments

The lesser member of every twin-prime pair occurs in this sequence. Hence A001359 is a subsequence. - T. D. Noe, Sep 17 2007

Crossrefs

Equals A067888 - 1. - Michel Marcus, Feb 11 2018

Programs

A190646 Least number k such that d(k-1) = d(k+1) = 2n or 0 if no such k exists, where d(n)=A000005(n).

Original entry on oeis.org

4, 7, 19, 41, 127252, 199, 26890624, 919, 17299, 6641, 25269208984376, 3401, 3900566650390624, 640063, 8418574, 18089, 1164385682220458984374, 41651, 69528379848480224609374, 128465, 34084859374, 12164095, 150509919493198394775390626, 90271
Offset: 1

Views

Author

Juri-Stepan Gerasimov, May 15 2011, May 20 2011

Keywords

Comments

a(28) = 2319679. a(30) = 3568049.
From Chai Wah Wu, Mar 13 2019: (Start)
a(26) = 64505245697, a(27) = 3959299, a(29) = 237828698392557762563228607177734374, a(31) = 26711406049549496732652187347412109374, a(32) = 441559, a(34) = 12535291248641, a(36) = 352351, a(37) = 1749348542212388688829378224909305572509765626, a(38) = 193405731995647.
Conjecture: if p is an odd prime, then a(p) is even.
(End)

Examples

			a(16)=18089 because d(18088)=d(18090)=2*16.
		

Crossrefs

Extensions

a(7), a(11), a(13), and a(15) from T. D. Noe, May 25 2011
a(17), a(19), a(21)-a(23) from Chai Wah Wu, Mar 13 2019
b-file extending to a(40) from Hugo van der Sanden, Mar 04 2022

A275418 Numbers n such that n - 1 has exactly as many odd divisors as n + 1.

Original entry on oeis.org

3, 4, 6, 11, 12, 13, 18, 21, 23, 25, 27, 30, 34, 39, 42, 45, 47, 56, 57, 60, 72, 75, 81, 86, 87, 92, 93, 94, 95, 99, 102, 105, 108, 109, 117, 123, 124, 131, 135, 138, 139, 142, 144, 147, 150, 155, 159, 160, 165, 169, 177, 180, 184, 186, 192, 193, 198, 202, 204, 207, 213, 214, 216
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 27 2016

Keywords

Comments

Numbers n > 1 such that d(2n - 2) + d(n + 1) = d(2n + 2) + d(n - 1) where d = A000005.
Conjectures:
(1) There are only finitely many terms n such that A001227(n - 1) = A001227(n + 1) is odd: 3, 99, 577, 3363, ... (see A276188).
(2) There are only finitely many terms n such that A001227(n - 1) = A001227(n) = A001227(n + 1) = 2: 6, 11, 12, 13, 23, 47, 192, 193, 383, 786432, ... (see also A181490-A181493, A276136).
(3) There are only finitely many prime terms p such that A001227(p - 1) = A001227(p + 1) is prime: 11, 13, 23, 47, 193, 383, 577, ... (see also A275598).
I don't find any more for conjecture #3 up to 10^10. - Charles R Greathouse IV, Aug 22 2016

Examples

			3 is in this sequence because 2 and 4 both have only one odd divisor, 1.
4 is in this sequence because 3 and 5 both have exactly two odd divisors each (1 and 3 for the former, 1 and 5 for the latter).
		

Crossrefs

Programs

  • Magma
    [n: n in [2..216] | NumberOfDivisors(2*(n-1))+ NumberOfDivisors(n+1) eq NumberOfDivisors(2*(n+1))+ NumberOfDivisors(n-1)];
    
  • Maple
    N:= 1000: # to get all terms < N
    nod:= proc(n) numtheory:-tau(n/2^padic:-ordp(n,2)) end proc:
    X:= map(nod,[$1..N]):
    select(t -> X[t+1]=X[t-1], [$2..N-1]); # Robert Israel, Aug 04 2016
  • Mathematica
    f[n_] := Count[Divisors@ n, k_ /; OddQ@ k]; Select[Range[2, 240], f[# - 1] == f[# + 1] &] (* Michael De Vlieger, Jul 28 2016 *)
    Flatten[Position[Partition[Table[Count[Divisors[n],?OddQ],{n,300}],3,1],?(#[[1]]==#[[3]]&),{1},Heads->False]]+1 (* Harvey P. Dale, Nov 02 2016 *)
  • PARI
    a001227(n) = sumdiv(n, d, d%2);
    is(n) = a001227(n-1)==a001227(n+1) \\ Felix Fröhlich, Jul 27 2016
    
  • PARI
    is(n)=numdiv((n-1)>>valuation(n-1,2)) == numdiv((n+1)>>valuation(n+1,2)) \\ Charles R Greathouse IV, Jul 29 2016

Extensions

Name edited by Alonso del Arte, Aug 23 2016

A377319 a(n) is the smallest positive integer k such that n + k and n - k have the same number of divisors.

Original entry on oeis.org

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

Views

Author

Felix Huber, Nov 17 2024

Keywords

Comments

If the strong Goldbach conjecture is true, that every even number >= 8 is the sum of two distinct primes, then a positive integer k <= A082467(n) exists for n >= 4.

Examples

			a(8) = 2 because 10 and 6 have both four divisors. 9 and 7 have a different number of divisors.
		

Crossrefs

Programs

  • Maple
    A377319:=proc(n)
       local k;
       for k to n-1 do
          if NumberTheory:-tau(n+k)=NumberTheory:-tau(n-k) then
             return k
          fi
       od;
    end proc;
    seq(A377319(n),n=4..90);
  • Mathematica
    A377319[n_] := Module[{k = 0}, While[DivisorSigma[0, ++k + n] != DivisorSigma[0, n - k]]; k];
    Array[A377319, 100, 4] (* Paolo Xausa, Dec 03 2024 *)
  • PARI
    a(n) = my(k=1); while (numdiv(n+k) != numdiv(n-k), k++); k; \\ Michel Marcus, Nov 17 2024

Formula

1 <= a(n) <= A082467(n).

A260256 Numbers n such that tau(n + 2) = tau(n - 2) where tau(k) = A000005(k).

Original entry on oeis.org

5, 8, 9, 12, 15, 21, 24, 30, 36, 37, 39, 45, 53, 60, 67, 68, 69, 81, 84, 89, 93, 99, 105, 111, 112, 113, 117, 120, 121, 127, 129, 131, 143, 144, 157, 158, 165, 172, 173, 184, 185, 188, 195, 202, 203, 204, 207, 211, 215, 216, 217, 219, 222, 225, 226, 231, 248, 251, 276, 277, 279, 284, 288
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 21 2015

Keywords

Comments

Pinner proves that this sequence is infinite, and in particular a(n) << n (log n)^7. The correct order is conjectured to be around n sqrt(log n). - Charles R Greathouse IV, Jul 21 2015

Examples

			8 is a member as 10 and 6 both have 4 divisors.
		

Crossrefs

Programs

  • Magma
    [ n : n in [3..300] | Denominator((NumberOfDivisors(n-2))/(NumberOfDivisors(n+2))) eq 1 and Denominator((NumberOfDivisors(n+2))/(NumberOfDivisors(n-2))) eq 1];
    
  • Mathematica
    Select[ Range@ 290, DivisorSigma[0, # - 2] == DivisorSigma[0, # + 2] &] (* Robert G. Wilson v, Jul 21 2015 *)
  • PARI
    is(n)=n>4&&numdiv(n-2)==numdiv(n+2) \\ Charles R Greathouse IV, Jul 21 2015

Formula

A000005(a(n) + 2) = A000005(a(n) - 2).

A192220 Semiprimes s such that tau(s-1) = tau(s+1) where tau = A000005.

Original entry on oeis.org

4, 6, 9, 34, 51, 55, 86, 94, 129, 142, 183, 185, 202, 214, 218, 247, 249, 302, 341, 394, 415, 446, 471, 473, 535, 583, 634, 698, 723, 737, 807, 851, 905, 922, 926, 949, 1042, 1138, 1149, 1205, 1211, 1241, 1257, 1262, 1313, 1315, 1337, 1346, 1402, 1527, 1546, 1577, 1594, 1642, 1646, 1673, 1687
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 26 2011

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[2000], PrimeOmega[#] == 2 && Equal @@ DivisorSigma[0, # + {-1, 1}] &] (* Amiram Eldar, Jan 23 2025 *)
  • PARI
    isok(k) = bigomega(k) == 2 && numdiv(k-1) == numdiv(k+1); \\ Amiram Eldar, Jan 23 2025

Formula

A001358 INTERSECT A067888.

A294173 Numbers k whose nearest neighbors have the same number of divisors, the same number of distinct prime factors, and the same sum of divisors.

Original entry on oeis.org

34, 55, 919, 1241, 4149, 4188, 7170, 12566, 15086, 24882, 25020, 26610, 51836, 53964, 59988, 77058, 143370, 150420, 167561, 170562, 205728, 215070, 220818, 418308, 564858, 731321, 907255, 910316, 986154, 1239870, 1569336, 1622914, 1841861, 1887240, 1979307, 2229012, 2262108
Offset: 1

Views

Author

Torlach Rush, Feb 10 2018

Keywords

Comments

mu(k-1) = mu(k+1), where mu(k) = A008683(k), since k-1 and k+1 have the same number of distinct prime factors.
tau(k-1) = tau(k+1) = abs(phi(k-1) - phi(k+1)) iff abs(phi(k-1) - phi(k+1)) = 4, where phi(j) is A000010. When tau(j) = 4 omega(j) = 2 and phi(j), the product of two even numbers is divisible by 4.
For known elements:
- sigma(k +- 1) and tau(k +- 1) the greatest common divisor is 4.
- sigma(k +- 1) is divisible by tau(k +- 1).
- the digital root of sigma(k +- 1) is either 3 or 9.
- the prime signature of k +- 1 is the same (see question below).
The first prime terms are 919, 110495719, 2587274227, 3908452759, 4020447619, and 9314901619. - Giovanni Resta, Feb 12 2018
Are the prime signatures of k +- 1 always the same? - Andrey Zabolotskiy, Feb 14 2018

Examples

			34 is in the sequence because tau(33)=tau(35)=4, omega(33)=omega(35)=2, and sigma(33)=sigma(35)=48.
919 is in the sequence because tau(918)=tau(920)=16, omega(918)=omega(920)=3, and sigma(918)=sigma(920)=2160.
		

Crossrefs

Intersection of A067888, A088070, and A055574.

Programs

  • GAP
    Filtered([2..2000000],k->Sigma(k-1)=Sigma(k+1) and Number(FactorsInt(k-1))=Number(FactorsInt(k+1)) and Tau(k-1)=Tau(k+1)); # Muniru A Asiru, Feb 17 2018
    
  • Maple
    with(numtheory):
    select(k->sigma(k-1)=sigma(k+1) and mobius(k-1)=mobius(k+1) and tau(k-1)=tau(k+1), [$2..2000000]); # Muniru A Asiru, Feb 17 2018
  • Mathematica
    1 + Position[Partition[Array[{DivisorSigma[0, #], DivisorSigma[1, #], PrimeOmega[#]} &, 10^6], 3, 1], ?(#[[1]] == +#[[-1]] &), {1}, Heads -> False][[All, 1]] (* _Michael De Vlieger, Feb 17 2018 *)
  • PARI
    list(lim)=my(v=List(),k2=7,s2=sigma(k2),k1=8,s1=sigma(k1),s); forfactored(k=9,1+lim\1, s=sigma(k); if(s==s2 && numdiv(k)==numdiv(k2) && omega(k)==omega(k2), listput(v,k1[1])); k2=k1; k1=k; s2=s1; s1=s); Vec(v) \\ Charles R Greathouse IV, Feb 20 2018

A356766 Least number k such that k and k+2 both have exactly 2n divisors, or -1 if no such number exists.

Original entry on oeis.org

3, 6, 18, 40, 127251, 198, 26890623, 918, 17298, 6640, 25269208984375, 3400, 3900566650390623, 640062, 8418573, 18088, 1164385682220458984373, 41650, 69528379848480224609373, 128464, 34084859373, 12164094, 150509919493198394775390625, 90270, 418514293125, 64505245696
Offset: 1

Views

Author

Jean-Marc Rebert, Aug 26 2022

Keywords

Examples

			For n=1, numdiv(3) = numdiv(5) = 2 = 2*1, and no number < 3 satisfies this, hence a(1) = 3.
		

Crossrefs

Numbers k such that k and k+2 both have exactly m divisors: A001359 (m=2), A356742 (m=4), A356743 (m=6), A356744 (m=8).

Programs

Extensions

More terms from Jinyuan Wang, Aug 28 2022

A384195 a(n) = tau(n+1) - tau(n-1), where tau(n) = A000005(n), the number of divisors of n.

Original entry on oeis.org

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

Views

Author

Dan Dart, May 21 2025

Keywords

Comments

Conjecture: a(n)=0 for an infinite number of values.

Examples

			a(10) = tau(11) - tau(9) = 2 - 3 = -1.
		

Crossrefs

Programs

  • Haskell
    divides ∷ (Integral a) ⇒ a → a → Bool
    divides a b = b `mod` a == 0
    properFactors ∷ Integral a ⇒ a → [a]
    properFactors n = 1 : filter (`divides` n) [2..(n `div` 2)]
    factors ∷ Integral a ⇒ a → [a]
    factors 1 = [1]
    factors n = properFactors n <> [n]
    tauSuccMinusTauPred :: Integer -> Integer
    tauSuccMinusTauPred n = fromIntegral (length (factors (n + 1))) - fromIntegral (length (factors (n - 1)))
    
  • PARI
    a(n) = numdiv(n+1) - numdiv(n-1); \\ Michel Marcus, May 21 2025

Formula

a(n) = tau(n+1) - tau(n-1).
Showing 1-10 of 10 results.