A275418 Numbers n such that n - 1 has exactly as many odd divisors as n + 1.
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
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).
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
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
Comments