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-4 of 4 results.

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

A284037 Primes p such that p-1 and p+1 have two distinct prime factors.

Original entry on oeis.org

11, 13, 19, 23, 37, 47, 53, 73, 97, 107, 163, 193, 383, 487, 577, 863, 1153, 2593, 2917, 4373, 8747, 995327, 1492993, 1990657, 5308417, 28311553, 86093443, 6879707137, 1761205026817, 2348273369087, 5566277615617, 7421703487487, 21422803359743, 79164837199873
Offset: 1

Views

Author

Giuseppe Coppoletta, Mar 28 2017

Keywords

Comments

Either p-1 or p+1 must be of the form 2^i * 3^j, since among three consecutive numbers exactly one is a multiple of 3. - Giovanni Resta, Mar 29 2017
Subsequence of A219528. See the previous comment. - Jason Yuen, Mar 08 2025

Examples

			7 is not a term because n + 1 = 8 has only one prime factor.
23 is a term because it is prime and n - 1 = 22 has two distinct prime factors (2, 11) and n + 1 = 24 has two distinct prime factors (2, 3).
43 is not a term because n - 1 = 42 has three distinct prime factors (2, 3, 7).
		

Crossrefs

Programs

  • Maple
    N:= 10^20: # To get all terms <= N
    Res:= {}:
    for i from 1 to ilog2(N) do
      for j from 1 to floor(log[3](N/2^i)) do
        q:= 2^i*3^j;
        if isprime(q-1) and nops(numtheory:-factorset((q-2)/2^padic:-ordp(q-2,2)))=1 then Res:= Res union {q-1} fi;
        if isprime(q+1) and nops(numtheory:-factorset((q+2)/2^padic:-ordp(q+2,2)))=1 then Res:= Res union {q+1} fi
    od od:
    sort(convert(Res,list)); # Robert Israel, Apr 16 2017
  • Mathematica
    mx = 10^30; ok[t_] := PrimeQ[t] && PrimeNu[t-1]==2==PrimeNu[t+1]; Sort@ Reap[Do[ w = 2^i 3^j; Sow /@ Select[ w+ {1,-1}, ok], {i, Log2@ mx}, {j, 1, Log[3, mx/2^i]}]][[2, 1]] (* terms up to mx, Giovanni Resta, Mar 29 2017 *)
  • PARI
    isok(n) = isprime(n) && (omega(n-1)==2) && (omega(n+1)==2); \\ Michel Marcus, Apr 17 2017
  • Sage
    omega=sloane.A001221; [n for n in prime_range(10^6) if 2==omega(n-1)==omega(n+1)]
    
  • Sage
    sorted([2^i*3^j+k for i in (1..40) for j in (1..20) for k in (-1,1) if is_prime(2^i*3^j+k) and sloane.A001221(2^i*3^j+2*k)==2])
    

Formula

A001221(a(n)) = 1 and A001221(a(n) - 1) = A001221(a(n) + 1) = 2.

Extensions

a(33)-a(34) from Giovanni Resta, Mar 29 2017

A276188 Numbers k > 1 such that the number of odd divisors of k-1 is odd and is equal to the number of odd divisors of k+1.

Original entry on oeis.org

3, 99, 577, 3363
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 23 2016

Keywords

Comments

Conjecture: this sequence is finite.
Any further terms are greater than 10^10. - Charles R Greathouse IV, Aug 22 2016

Examples

			99 is in this sequence because there are 3 odd divisors 1, 7 and 49 of 98 and there are 3 odd divisors 1, 5 and 25 of 100, and 3 is odd.
		

Crossrefs

Programs

  • Magma
    [n: n in [2..100000] | NumberOfDivisors(2*(n-1))- NumberOfDivisors(n-1) eq NumberOfDivisors(2*(n+1))-NumberOfDivisors(n+1) and ((NumberOfDivisors(2*(n+1))- NumberOfDivisors(n+1)) mod 2) eq 1 ];
  • Mathematica
    odo[n_]:=Module[{c=Select[Divisors[n],OddQ]},If[OddQ[Length[c]],Length[c],0]]; Flatten[ Position[ Partition[Array[odo,3500],3,1],?(AllTrue[{#[[1]],#[[3]]},OddQ]&&#[[1]]==#[[3]]&),1,Heads->False]]+1 (* _Harvey P. Dale, Apr 07 2023 *)

A369615 Powers of primes (A000961) whose neighbors have a prime number as their greatest odd divisor.

Original entry on oeis.org

4, 11, 13, 23, 25, 27, 47, 81, 193, 383, 2187, 1594323
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 27 2024

Keywords

Comments

From Jon E. Schoenfield, Jan 28 2024: (Start)
If it exists, a(13) > 10^2000.
Conjecture: a(12) = 1594323 is the final term of the sequence.
(End)

Examples

			(prime = greatest odd divisor of a(n)-1; a(n); prime = greatest odd divisor of a(n)+1): (3; 4; 5), (5; 11; 3), (3; 13; 7), (11; 23; 3), (3; 25; 13), (13; 27; 7), (23; 47; 3), (5; 81; 41), (3; 193; 97), (191; 383; 3), (1093; 2187; 547), (797161; 1594323; 398581).
		

Crossrefs

Intersection of A000961 and A369329.
Cf. A038550.
Comparable sequences: A275598, A343973.

Programs

  • Magma
    [k: k in [2..1600000] | #Divisors(2*k-2)-#Divisors(k-1) eq 2 and
     #PrimeDivisors(k) eq 1 and #Divisors(2*k+2)-#Divisors(k+1) eq 2];
  • Mathematica
    q[n_] := PrimeQ[n/2^IntegerExponent[n, 2]]; Select[Range[2*10^6], PrimePowerQ[#] && And @@ q /@ {# - 1, # + 1} &] (* Amiram Eldar, Jan 28 2024 *)
Showing 1-4 of 4 results.