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.

Previous Showing 11-17 of 17 results.

A072436 Remove prime factors of form 4*k+3.

Original entry on oeis.org

1, 2, 1, 4, 5, 2, 1, 8, 1, 10, 1, 4, 13, 2, 5, 16, 17, 2, 1, 20, 1, 2, 1, 8, 25, 26, 1, 4, 29, 10, 1, 32, 1, 34, 5, 4, 37, 2, 13, 40, 41, 2, 1, 4, 5, 2, 1, 16, 1, 50, 17, 52, 53, 2, 5, 8, 1, 58, 1, 20, 61, 2, 1, 64, 65, 2, 1, 68, 1, 10, 1, 8, 73, 74, 25, 4, 1, 26, 1, 80, 1, 82, 1, 4, 85, 2, 29
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 17 2002

Keywords

Comments

a(n) <= n; a(a(n)) = a(n); for all factors p^m of a(n): p=2 or p=4*k+1.

Examples

			a(90) = a(2*3*3*5) = a(2*(4*0+3)^2*(4*1+1)^1) = 2*1^2*5 = 10.
		

Crossrefs

Equals n / A097706(n).

Programs

  • Maple
    a:= n-> mul(`if`(irem(i[1], 4)=3, 1, i[1]^i[2]), i=ifactors(n)[2]):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 09 2014
  • Mathematica
    a[n_] := n/Product[{p, e} = pe; If[Mod[p, 4] == 3, p^e, 1], {pe, FactorInteger[n]}];
    Array[a, 100] (* Jean-François Alcover, May 29 2019 *)
  • PARI
    a(n) = my(f=factor(n)); for (k=1, #f~, if ((f[k,1] % 4) == 3, f[k,1]=1)); factorback(f); \\ Michel Marcus, May 08 2017
  • Python
    from sympy import factorint
    from operator import mul
    def a(n):
        f = factorint(n)
        return 1 if n == 1 else reduce(mul, [1 if i%4==3 else i**f[i] for i in f])# Indranil Ghosh, May 08 2017
    

Formula

Multiplicative with a(p) = (if p==3 (mod 4) then 1 else p).

A343431 Part of n composed of prime factors of the form 6k-1.

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 11, 1, 1, 1, 5, 1, 17, 1, 1, 5, 1, 11, 23, 1, 25, 1, 1, 1, 29, 5, 1, 1, 11, 17, 5, 1, 1, 1, 1, 5, 41, 1, 1, 11, 5, 23, 47, 1, 1, 25, 17, 1, 53, 1, 55, 1, 1, 29, 59, 5, 1, 1, 1, 1, 5, 11, 1, 17, 23, 5, 71, 1, 1, 1, 25, 1, 11, 1, 1, 5, 1, 41, 83, 1, 85, 1, 29, 11, 89, 5
Offset: 1

Views

Author

Peter Munn, Apr 15 2021

Keywords

Comments

Completely multiplicative with a(p) = p if p is of the form 6k-1 and a(p) = 1 otherwise.
Largest term of A259548 that divides n.

Crossrefs

Equivalent sequence for distinct prime factors: A170825.
Equivalent sequences for prime factors of other forms: A000265 (2k+1), A343430 (3k-1), A170818 (4k+1), A097706 (4k-1), A248909 (6k+1), A065330 (6k+/-1), A065331 (<= 3), A355582 (<= 5).
Range of terms: A259548.

Programs

  • Mathematica
    f[p_, e_] := If[Mod[p, 6] == 5, p^e, 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* after Amiram Eldar at A248909 *)
  • PARI
    a(n) = {my(f = factor(n)); for (i=1, #f~, if ((f[i, 1] + 1) % 6, f[i, 1] = 1); ); factorback(f); } \\ after Michel Marcus at A248909
    
  • Python
    from math import prod
    from sympy import factorint
    def A343431(n): return prod(p**e for p, e in factorint(n).items() if not (p+1)%6) # Chai Wah Wu, Dec 26 2022

Formula

a(n) = n / A065331(n) / A248909(n) = A065330(n) / A248909(n).

A170817 a(n) = product of distinct primes of form 4k+1 that divide n.

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 13, 1, 5, 1, 17, 1, 1, 5, 1, 1, 1, 1, 5, 13, 1, 1, 29, 5, 1, 1, 1, 17, 5, 1, 37, 1, 13, 5, 41, 1, 1, 1, 5, 1, 1, 1, 1, 5, 17, 13, 53, 1, 5, 1, 1, 29, 1, 5, 61, 1, 1, 1, 65, 1, 1, 17, 1, 5, 1, 1, 73, 37, 5, 1, 1, 13, 1, 5, 1, 41, 1, 1, 85, 1, 29, 1
Offset: 1

Views

Author

N. J. A. Sloane, Dec 22 2009

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> mul (i, i=map (x-> x[1], select (x-> isprime (x[1]) and irem (x[1], 4)=1, ifactors(n)[2]))): seq (a(n), n=1..120);
  • Mathematica
    Table[Times@@Select[Transpose[FactorInteger[n]][[1]],Mod[#,4]==1&], {n,90}] (* Harvey P. Dale, Dec 07 2012 *)
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i,1] % 4 == 1, f[i,1], 1));} \\ Amiram Eldar, Jun 09 2025

Extensions

Corrected and extended with Maple program by Alois P. Heinz, Dec 23 2009

A260730 Numbers n for which A065339(n) > A260728(n).

Original entry on oeis.org

21, 33, 42, 57, 66, 69, 77, 84, 93, 105, 114, 129, 132, 133, 138, 141, 154, 161, 165, 168, 177, 186, 189, 201, 209, 210, 213, 217, 228, 231, 237, 249, 253, 258, 264, 266, 273, 276, 282, 285, 297, 301, 308, 309, 321, 322, 329, 330, 336, 341, 345, 354, 357, 372, 378, 381, 385, 393, 399, 402, 413, 417, 418, 420, 426, 429, 434, 437, 441, 453, 456, 462, 465, 469, 473, 474, 483, 489, 497, 498, 501, 506, 513, 516, 517, 525, 528, 532, 537, 546, 552
Offset: 1

Views

Author

Antti Karttunen, Aug 12 2015

Keywords

Comments

Numbers n such that when the exponents in the prime factorization of A097706(n) are added in base-2 they produce at least one carry-bit. In other words, in that set of exponents {e1, e2, ..., en} there is at least one pair e_i, e_j that their binary representations have at least one 1-bit in the same position. (Here i and j are distinct as e_i and e_j are exponents of different primes, although e_i could be equal to e_j. See the examples.)
This differs from A119973 for the first time at n=30 where a(30)=231, term which is not present in A119973. Note that n=231 is the first position where the difference A065339(n) - A260728(n) > 1 as 231 = 3*7*11, a product of three distinct 4k+3 primes, thus A065339(231) = 3, while A260728(231) = 1.

Examples

			21 = 3^1 * 7^1 is present, because in its prime factors of the form 4k+3 (which are 3 and 7) the exponents 1 and 1 have at least one 1-bit in the same position, thus producing a carry-bit when summed in base-2.
63 = 3^2 * 7^1 is NOT present, because in its prime factors of the form 4k+3 the exponents 2 and 1 ("10" and "1" in binary) do NOT produce a carry-bit when summed in base-2, as those binary representations do not have any 1's in a common position.
189 = 3^3 * 7^1 is present, because in its prime factors of the form 4k+3 the exponents 3 and 1 ("11" and "1" in binary) have at least one 1-bit in the same position, thus producing a carry-bit when summed in base-2.
		

Crossrefs

A363340 a(n) is the smallest positive integer such that a(n) * n is the sum of two squares.

Original entry on oeis.org

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

Views

Author

Peter Schorn, May 28 2023

Keywords

Comments

Using Fermat's two-squares theorem it is easy to see that a(n) is the product of all prime factors of n that are congruent to 3 modulo 4 and have an odd exponent.
This implies that a(n) is also the smallest positive integer such that n / a(n) is the sum of two squares.
Equivalently, a(n) is the product of all primes of the form 4k+3 that divide the squarefree part of n. If we use the squarefree kernel instead, we get A170819. - Peter Munn, Aug 06 2023

Examples

			a(1) = a(2) = 1 since 1 and 2 are sums of two squares.
a(3) = 3 since 3 and 6 are not sums of two squares but 3*3 is.
a(6) = 3 since 6 and 12 are not sums of two squares but 3*6 = 3^2 + 3^2.
		

Crossrefs

Cf. A001481 (positions of 1's), A167181 (range of values).
Fixed points: A167181.

Programs

  • PARI
    a(n) = my(r=1); foreach(mattranspose(factor(n)), f, if(f[1]%4==3&&f[2]%2==1, r*=f[1])); r

Formula

Multiplicative with a(p^e) = p if p^e == 3 (mod 4), otherwise 1. - Peter Munn, Jul 03 2023
From Peter Munn, Aug 06 2023: (Start)
a(n) = A007913(A097706(n)) = A097706(A007913(n)).
a(n) == A000265(n) (mod 4).
a(A059897(n, k)) = A059897(a(n), a(k)).
(End)

A102574 a(n) is the sum of the distinct norms of the divisors of n over the Gaussian integers.

Original entry on oeis.org

1, 7, 10, 31, 31, 70, 50, 127, 91, 217, 122, 310, 183, 350, 310, 511, 307, 637, 362, 961, 500, 854, 530, 1270, 781, 1281, 820, 1550, 871, 2170, 962, 2047, 1220, 2149, 1550, 2821, 1407, 2534, 1830, 3937, 1723, 3500, 1850, 3782, 2821, 3710, 2210, 5110, 2451
Offset: 1

Views

Author

Yasutoshi Kohmoto, Feb 25 2005

Keywords

Comments

Also sum of divisors of n^2 which are the sum of two squares (A001481). For example the divisors of 3^2 are 1, 3, 9 of which only 1 and 9 are in A001481 and a(3) = 1 + 9 = 10. - Jianing Song, Aug 03 2018

Examples

			Let ||i|| denote the norm of i.
a(2) = 1 + ||1+i|| + 2^2 = 1 + 2 + 4 = 7.
a(5) = 1 + ||1+2i|| + 5^2 = 1 + 5 + 25 = 31. Note that ||1+2i|| = ||2+i|| so their norm (5) is only counted once.
		

Crossrefs

Cf. A000203 (sigma), A001157 (sigma_2), A001481, A097706, A103230, A243380.

Programs

  • Mathematica
    b[n_] := Product[{p, e} = pe; If[Mod[p, 4] == 3, p^e, 1], {pe, FactorInteger[n]}];
    a[n_] := With[{r = b[n]}, DivisorSigma[2, r] DivisorSigma[1, (n/r)^2]];
    a /@ Range[50] (* Jean-François Alcover, Sep 20 2019, from PARI *)
  • PARI
    \\ here b(n) is A097706.
    b(n)={my(f=factor(n)); my(r=prod(i=1, #f~, my([p,e]=f[i,]); if(p%4==3, p^e, 1))); r}
    a(n)={my(r=b(n)); sigma(r,2)*sigma((n/r)^2)} \\ Andrew Howroyd, Aug 03 2018
    
  • Python
    from math import prod
    from sympy import factorint
    def A102574(n): return prod((q := int(p & 3 == 3))*(p**(2*(e+1))-1)//(p**2-1) + (1-q)*(p**(2*e+1)-1)//(p-1) for p, e in factorint(n).items()) # Chai Wah Wu, Jun 28 2022

Formula

a(n) = sigma_2(A097706(n)) * sigma((n/A097706(n))^2). - Andrew Howroyd, Aug 03 2018
Multiplicative with a(p^e) = sigma(p^(2e)) = (p^(2e+1) - 1)/(p - 1) if p = 2 or p == 1 (mod 4); sigma_2(p^e) = (p^(2e+2) - 1)/(p^2 - 1) if p == 3 (mod 4). - Jianing Song, Aug 03 2018
Sum_{k=1..n} a(k) ~ c * n^3, where c = (5/12) * zeta(3) * A243380 = 0.52812367275583317729... . - Amiram Eldar, Feb 13 2024

Extensions

Corrected and extended by David Wasserman, Apr 08 2008
Keyword:mult added by Andrew Howroyd, Aug 03 2018
Name clarified by Jianing Song, Aug 03 2018

A097707 Part of n! composed of prime factors of form 4k+3.

Original entry on oeis.org

1, 1, 3, 3, 3, 9, 63, 63, 567, 567, 6237, 18711, 18711, 130977, 392931, 392931, 392931, 3536379, 67191201, 67191201, 1411015221, 15521167431, 356986850913, 1070960552739, 1070960552739, 1070960552739, 28915934923953
Offset: 1

Views

Author

Ralf Stephan, Aug 30 2004

Keywords

Comments

log(a(n)) ~ 1/2 log n!.

Crossrefs

Equals A097706(A000142(n)).

Programs

  • PARI
    a(n)=local(f); f=factor(n!); prod(k=1, matsize(f)[1], if(f[k, 1]%4<>3, 1, f[k, 1]^f[k, 2]))

Extensions

Typo in PARI code fixed by Colin Barker, Mar 12 2015
Previous Showing 11-17 of 17 results.