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.

A275598 Primes p such that the number of odd divisors of p-1 is a prime q which is equal to the number of odd divisors of p+1.

Original entry on oeis.org

11, 13, 23, 47, 193, 383, 577
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
Any further terms are greater than 2 * 10^12. - Dana Jacobsen, Aug 30 2016

Examples

			11 is in this sequence because there are 2 odd divisors 1 and 5 of 10 and there are 2 odd divisors 1 and 3 of 12, and 2 is a prime.
		

Crossrefs

Programs

  • Maple
    filter:= proc(p) local r,q;
       r:= numtheory:-tau((p-1)/2^padic:-ordp(p-1,2));
       if not isprime(r) then return false fi;
       r = numtheory:-tau((p+1)/2^padic:-ordp(p+1,2))
    end proc:
    res:= NULL: p:= 0:
    while p < 1000 do
      p:= nextprime(p);
      if filter(p) then
        res:= res, p;
      fi;
    od:
    res; # Robert Israel, Aug 24 2016
  • Mathematica
    okQ[p_?PrimeQ] := Module[{r}, r = DivisorSigma[0, (p-1)/2^IntegerExponent[p-1, 2]]; If[!PrimeQ[r], Return[False]]; r == DivisorSigma[0, (p+1)/2^IntegerExponent[p+1, 2]]];
    Select[Prime[Range[1000]], okQ] (* Jean-François Alcover, Feb 09 2023, after Robert Israel *)
  • PARI
    f(n)=numdiv(n>>valuation(n,2))
    is(n)=if(!isprime(n), return(0)); my(q=f(n-1)); isprime(q) && f(n+1)==q \\ Charles R Greathouse IV, Aug 24 2016
  • Perl
    use ntheory ":all"; forprimes { $n1 = scalar(grep { $&1 } divisors($-1)); say if is_prime($n1) && $n1 == scalar(grep { $&1 } divisors($+1)); } 1e7; # Dana Jacobsen, Aug 24 2016
    

A276136 Numbers m > 1 such that the largest odd divisors of m-1, m, and m+1 are prime.

Original entry on oeis.org

6, 11, 12, 13, 23, 47, 192, 193, 383, 786432
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 22 2016

Keywords

Comments

Conjecture: this sequence is finite.
Any further terms are greater than 10^11. - Charles R Greathouse IV, Aug 22 2016
From Robert Israel, Apr 27 2020: (Start)
Each term is either of the form 3*2^k with 3*2^k-1 and 3*2^k+1 prime, or 3*2^k-1 with 3*2^k-1 prime and 3*2^(k-1)-1 prime, or 3*2^k+1 with 3*2^k+1 prime and 3*2^(k-1)+1 prime.
Any further terms > 10^2000.
(End)

Examples

			6 is in this sequence because the largest odd divisor of 5 is 5, the largest odd divisor of 6 is 3 and the largest odd divisor of 7 is 7, and all three are prime.
		

Crossrefs

Supersequence of A181493. Subsequence of A038550.

Programs

  • Magma
    [n: n in [2..3000000] | NumberOfDivisors(2*(n-1))- NumberOfDivisors(n-1)eq 2 and NumberOfDivisors(2(n))-NumberOfDivisors(n) eq 2 and NumberOfDivisors(2*(n+1))- NumberOfDivisors(n+1) eq 2];
    
  • Maple
    Res:= 6:
    for k from 2  while length(3*2^k-1)<1000 do
      if (isprime(3*2^k-1) and isprime(3*2^(k-1)-1)) then Res:= Res, 3*2^k-1
        fi;
      if (isprime(3*2^k-1) and isprime(3*2^k+1)) then Res:= Res, 3*2^k;
        fi;
      if (isprime(3*2^k+1) and isprime(3*2^(k-1)+1)) then Res:= Res, 3*2^k+1;
        fi;
    od:
    Res; # Robert Israel, Apr 27 2020
  • Mathematica
    Select[Range[2, 10^6], Function[n, Times @@ Boole@ PrimeQ@ Map[First@ Reverse@ DeleteCases[Divisors@ #, d_ /; EvenQ@ d] &, n + Range[-1, 1]] == 1]] (* Michael De Vlieger, Aug 22 2016 *)
    SequencePosition[Table[If[PrimeQ[Max[Select[Divisors[n],OddQ]]],1,0],{n,800000}],{1,1,1}][[;;,1]]+1 (* Harvey P. Dale, Jun 27 2023 *)
  • PARI
    isA038550(n)=isprime(n>>valuation(n,2))
    is(n)=isA038550(n-1) && isA038550(n) && isA038550(n+1) \\ Charles R Greathouse IV, Aug 22 2016
    
  • PARI
    forprime(p=2,1e11, my(a=isA038550(p-1),b=isA038550(p+1)); if(a && isA038550(p-2), print1(p-1", ")); if(a && b, print1(p", ")); if(b && isA038550(p+2), print1(p+1", "))) \\ may print numbers several times, but won't skip numbers; Charles R Greathouse IV, Aug 22 2016

Formula

A038550(a(n-1)) + 1 = A038550(a(n)) = A038550(a(n+1)) - 1.
a(n) >> n log n. - Charles R Greathouse IV, Aug 22 2016

A369329 Numbers whose neighbors have a prime number as their greatest odd divisor.

Original entry on oeis.org

4, 6, 11, 12, 13, 18, 21, 23, 25, 27, 30, 39, 42, 45, 47, 57, 60, 72, 75, 81, 87, 93, 95, 102, 105, 108, 117, 123, 135, 138, 147, 150, 159, 165, 177, 180, 192, 193, 198, 207, 213, 225, 228, 240, 270, 273, 282, 297, 303, 312, 315, 327, 333, 345, 348, 357, 383, 385, 387
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 20 2024

Keywords

Comments

Does this sequence contain a finite or infinite number of squares, powers of 3, even numbers, ...?

Crossrefs

Supersequence of A014574 and A276136.

Programs

  • Magma
    [k: k in [2..400] | #Divisors(2*k-2)-#Divisors(k-1) eq 2 and #Divisors(2*k+2)-#Divisors(k+1) eq 2];
  • Maple
    filter:= proc(n) local m;
        andmap(m -> isprime(m/2^padic:-ordp(m,2)), [n-1,n+1])
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Jan 24 2024
  • Mathematica
    q[n_] := PrimeQ[n / 2^IntegerExponent[n, 2]]; Select[Range[400], And @@ q /@ {# - 1, # + 1} &] (* Amiram Eldar, Jan 20 2024 *)
    Mean/@SequencePosition[Table[If[PrimeQ[Select[Divisors[n],OddQ][[-1]]],1,0],{n,400}],{1,,1}] (* _Harvey P. Dale, Jul 30 2025 *)

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 *)
Showing 1-4 of 4 results.