A273401 Numbers n such that n and n + 1 have exactly the same number of odd divisors.
1, 5, 6, 10, 11, 12, 13, 19, 22, 23, 28, 37, 40, 43, 46, 47, 49, 52, 54, 58, 61, 65, 67, 69, 73, 77, 79, 82, 84, 88, 96, 103, 106, 110, 112, 114, 119, 129, 132, 136, 140, 148, 151, 154, 155, 157, 163, 166, 172, 178, 182, 185, 186, 191, 192, 193, 203, 204, 211, 215, 216, 219, 220, 221
Offset: 1
Keywords
Examples
5 and 6 have both two odd divisors: (1 and 5) and (1 and 3) respectively; so 5 is a term in the sequence.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
A001227:= n -> numtheory:-tau(n)/(1+padic:-ordp(n,2)): R:= map(A001227,[$1..1000]): ListTools:-SearchAll(0,A001227[2..-1]-A001227[1..-2]); # Robert Israel, May 27 2016
-
Mathematica
Select[Range@ 221, First@ Differences@ Map[Count[Divisors@ #, ?OddQ] &, {#, # + 1}] == 0 &] (* _Michael De Vlieger, Jun 26 2016 *) SequencePosition[Table[Count[Divisors[n],?OddQ],{n,250}],{x,x_}] [[All, 1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 06 2019 *)
-
PARI
lista(nn) = for (n=1, nn, if (sumdiv(n, d, d%2) == sumdiv(n+1, d, d%2), print1(n, ", "))); \\ Michel Marcus, May 27 2016
-
PARI
is(n)=numdiv(n>>valuation(n,2))==numdiv((n+1)>>valuation(n+1,2)) \\ Charles R Greathouse IV, Jul 15 2016
Comments