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.

A170819 a(n) = product of distinct primes of the form 4k-1 that divide n.

Original entry on oeis.org

1, 1, 3, 1, 1, 3, 7, 1, 3, 1, 11, 3, 1, 7, 3, 1, 1, 3, 19, 1, 21, 11, 23, 3, 1, 1, 3, 7, 1, 3, 31, 1, 33, 1, 7, 3, 1, 19, 3, 1, 1, 21, 43, 11, 3, 23, 47, 3, 7, 1, 3, 1, 1, 3, 11, 7, 57, 1, 59, 3, 1, 31, 21, 1, 1, 33, 67, 1, 69, 7, 71, 3, 1, 1, 3, 19, 77, 3, 79, 1, 3, 1, 83, 21, 1
Offset: 1

Views

Author

N. J. A. Sloane, Dec 23 2009

Keywords

Crossrefs

Programs

  • Maple
    A170819 := proc(n) a := 1 ; for p in numtheory[factorset](n) do if p mod 4 = 3 then a := a*p ; end if; end do: a ; end proc:
    seq(A170819(n),n=1..20) ; # R. J. Mathar, Jun 07 2011
  • Mathematica
    Array[Times @@ Select[FactorInteger[#][[All, 1]], Mod[#, 4] == 3 &] &, 85] (* Michael De Vlieger, Feb 19 2019 *)
  • PARI
    for(n=1,99, t=select(x->x%4==3, factor(n)[,1]); print1(prod(i=1,#t,t[i])","))

Formula

Multiplicative with a(p^e) = p^A011765(p+1), e > 0. - R. J. Mathar, Jun 07 2011
a(n) = A007947(A097706(n)) = A097706(A007947(n)). - Peter Munn, Jul 06 2023

Extensions

Extended with PARI program by M. F. Hasler, Dec 23 2009

A245474 a(n) = smallest positive integer s such that s*n - floor(sqrt(s*n))^2 is a square.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 6, 7, 1, 1, 1, 11, 3, 1, 14, 3, 1, 1, 2, 19, 1, 21, 22, 23, 6, 1, 1, 3, 7, 1, 3, 31, 2, 33, 1, 35, 1, 1, 38, 6, 1, 2, 42, 43, 11, 1, 46, 47, 3, 1, 1, 3, 2, 1, 6, 55, 14, 57, 1, 59, 6, 2, 62, 7, 1, 1, 66, 67, 1, 69, 35, 71, 2, 1, 2, 3, 19
Offset: 0

Views

Author

Thomas Ordowski, Jul 23 2014

Keywords

Comments

a(n) <= n for n > 0. If prime p == 3 (mod 4) then a(p) = p.
Conjecture: a(p) < p for prime p == 1 (mod 4).
Outline of proof of conjecture: write p = x^2 + y^2. Since gcd(x,y) = 1, there are u,v with x*u + y*v = 1, u^2 + v^2 < y^2 + x^2 = p. Taking s = u^2 + v^2, s*p = (u*y+v*x)^2 + 1^2, and |u*y+v*x| = floor(sqrt(s*p)). - Robert Israel, Aug 04 2014
For the first 100000 primes p == 1 (mod 4), a(p) < sqrt(p)/2. - Robert Israel, Aug 03 2014

Crossrefs

Programs

  • Maple
    A:= proc(n) local s,a;
         for s from 1 do
           a:= floor(sqrt(s*n));
           if issqr(s*n-a^2) then return s fi
         od
    end proc:
    seq(A(n),n=0..1000); # Robert Israel, Jul 23 2014
  • Mathematica
    a245474[n_Integer] := Catch[
      Do[
       If[IntegerQ[Sqrt[(s*n - Floor[Sqrt[s*n]]^2)]] == True, Throw[s]],
       {s, n}]
      ]; Map[a245474, Range[100]] (* Michael De Vlieger, Aug 03 2014 *)
  • PARI
    a(n) = s=1; while(!issquare(s*n-sqrtint(s*n)^2), s++); s \\ Colin Barker, Jul 23 2014

Extensions

More terms from Colin Barker, Jul 23 2014

A302690 a(n) is the smallest integer m such that m*n is a sum of two squares but not one.

Original entry on oeis.org

2, 1, 6, 2, 1, 3, 14, 1, 2, 1, 22, 6, 1, 7, 3, 2, 1, 1, 38, 1, 42, 11, 46, 3, 2, 1, 6, 14, 1, 3, 62, 1, 66, 1, 7, 2, 1, 19, 3, 1, 1, 21, 86, 22, 1, 23, 94, 6, 2, 1, 3, 1, 1, 3, 11, 7, 114, 1, 118, 3, 1, 31, 14, 2, 1, 33, 134, 1, 138, 7, 142, 1, 1, 1, 6, 38, 154, 3, 158
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 11 2018

Keywords

Comments

Previous name was: a(n) is the smallest integer m such that A002828(m*n) = 2.
All terms are squarefree.
Using the sum of two squares theorem it is easy to see that a(n) is either A363340(n) (if A363340(n)*n is not a square) or 2*A363340(n) (if A363340(n)*n is a square). - Peter Schorn, Jul 20 2023

Crossrefs

Programs

  • Maple
    A302690 := proc(n)
        local k ;
        for k from 1 do
            if A002828(k*n) = 2 then
                return k;
            end if;
        end do:
    end proc:
    seq(A302690(n),n=1..100) ; # R. J. Mathar, Apr 16 2018
  • PARI
    a363340(n) = my(r=1); foreach(mattranspose(factor(n)), f, if(f[1]%4==3&&f[2]%2==1, r*=f[1])); r;
    a(n) = my(p=a363340(n)); if(issquare(p*n), 2*p, p); \\ Peter Schorn, Jul 20 2023

Formula

a(n^2) = 2.

Extensions

Name corrected and more terms added by Michel Marcus, Apr 12 2018
Better name from Peter Schorn, Jul 20 2023

A371015 The largest divisor of n that is the sum of 2 squares.

Original entry on oeis.org

1, 2, 1, 4, 5, 2, 1, 8, 9, 10, 1, 4, 13, 2, 5, 16, 17, 18, 1, 20, 1, 2, 1, 8, 25, 26, 9, 4, 29, 10, 1, 32, 1, 34, 5, 36, 37, 2, 13, 40, 41, 2, 1, 4, 45, 2, 1, 16, 49, 50, 17, 52, 53, 18, 5, 8, 1, 58, 1, 20, 61, 2, 9, 64, 65, 2, 1, 68, 1, 10, 1, 72, 73, 74, 25
Offset: 1

Views

Author

Amiram Eldar, Mar 08 2024

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[Mod[p, 4] == 3, p^(2*Floor[e/2]), p^e]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, f[i, 1]^if(f[i, 1]%4 == 3, 2*(f[i, 2]\2), f[i, 2]));}

Formula

Multiplicative with a(p^e) = p^(2*floor(e/2)) if p == 3 (mod 4), and p^e otherwise.
a(n) = n / A363340(n).
a(n) = n if and only if n is in A001481.
a(n) = 1 if and only if n is in A167181.
Showing 1-4 of 4 results.