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

A005094 Number of distinct primes of the form 4k+1 dividing n minus number of distinct primes of the form 4k+3 dividing n.

Original entry on oeis.org

0, 0, -1, 0, 1, -1, -1, 0, -1, 1, -1, -1, 1, -1, 0, 0, 1, -1, -1, 1, -2, -1, -1, -1, 1, 1, -1, -1, 1, 0, -1, 0, -2, 1, 0, -1, 1, -1, 0, 1, 1, -2, -1, -1, 0, -1, -1, -1, -1, 1, 0, 1, 1, -1, 0, -1, -2, 1, -1, 0, 1, -1, -2, 0, 2, -2, -1, 1, -2, 0, -1, -1, 1, 1, 0, -1, -2, 0, -1, 1, -1
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A079635 (difference when counted with multiplicity).

Programs

  • Haskell
    a005094 n = a005089 n - a005091 n  -- Reinhard Zumkeller, Jan 07 2013
  • Mathematica
    Join[{0},Table[Total[Which[Mod[#,4]==1,1,Mod[#,4]==3,-1,True,0]&/@ FactorInteger[ n][[All,1]]],{n,2,100}]] (* Harvey P. Dale, Sep 03 2022 *)

Formula

Additive with a(p^e) = 0 if p = 2, 1 if p == 1 (mod 4), -1 if p == 3 (mod 4).
From Reinhard Zumkeller, Jan 07 2013: (Start)
a(n) = A005089(n) - A005091(n).
a(A221264(n)) < 0.
a(A078613(n)) = 0.
a(A221265(n)) > 0. (End)
a(A267099(n)) = -a(n). - Antti Karttunen, Feb 03 2016
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = -A086239 = -0.334981... . - Amiram Eldar, Jan 02 2024

Extensions

More precise definition from Antti Karttunen, Feb 03 2016

A078613 Same numbers of distinct prime factors of forms 4*k+1 and 4*k+3.

Original entry on oeis.org

1, 2, 4, 8, 15, 16, 30, 32, 35, 39, 45, 51, 55, 60, 64, 70, 75, 78, 87, 90, 91, 95, 102, 110, 111, 115, 117, 119, 120, 123, 128, 135, 140, 143, 150, 153, 155, 156, 159, 174, 175, 180, 182, 183, 187, 190, 203, 204, 215, 219, 220, 222, 225, 230, 234, 235, 238, 240
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 10 2002

Keywords

Comments

Equivalently, numbers n such that A005089(n)=A005091(n); A005094(a(n))=0.
A001221(a(n)) and a(n) are of opposite parity.
If m is in the sequence, then also 2*m.
Conjecture : a(n) is asymptotic to c*n where c is around 4 - Benoit Cloitre, Jan 06 2003

Examples

			n = 99 = [(4*0+3)^2]*[(4*1+1)], therefore 99 is a term.
		

Crossrefs

Programs

  • Haskell
    a078613 n = a078613_list !! (n-1)
    a078613_list = filter ((== 0) . a005094) [1..]
    -- Reinhard Zumkeller, Jan 07 2013
  • Mathematica
    fQ[n_]:=Plus@@((Mod[#[[1]],4]-2)&/@If[n==1,{},FactorInteger[n]])==0; Select[Range[240],fQ] (* Ray Chandler, Dec 18 2011*)

Extensions

Edited by Ray Chandler, Dec 18 2011

A221265 Numbers having more distinct prime factors of form 4*k+1 than of 4*k+3.

Original entry on oeis.org

5, 10, 13, 17, 20, 25, 26, 29, 34, 37, 40, 41, 50, 52, 53, 58, 61, 65, 68, 73, 74, 80, 82, 85, 89, 97, 100, 101, 104, 106, 109, 113, 116, 122, 125, 130, 136, 137, 145, 146, 148, 149, 157, 160, 164, 169, 170, 173, 178, 181, 185, 193, 194, 195, 197, 200, 202
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 07 2013

Keywords

Comments

A005089(a(n)) > A005091(a(n)); A005094(a(n)) > 0.

Crossrefs

Programs

  • Haskell
    a221265 n = a221265_list !! (n-1)
    a221265_list = filter ((> 0) . a005094) [1..]
  • Mathematica
    mdpf1Q[n_]:=Module[{f=Transpose[FactorInteger[n]][[1]]},Count[f,?(Mod[ #,4] == 1&)]>Count[f,?(Mod[#,4]==3&)]]; Select[Range[2,250],mdpf1Q] (* Harvey P. Dale, Mar 03 2016 *)

A268380 Numbers having fewer prime factors of the form 4*k+1 than of the form 4*k+3, when counted with multiplicity.

Original entry on oeis.org

3, 6, 7, 9, 11, 12, 14, 18, 19, 21, 22, 23, 24, 27, 28, 31, 33, 36, 38, 42, 43, 44, 45, 46, 47, 48, 49, 54, 56, 57, 59, 62, 63, 66, 67, 69, 71, 72, 76, 77, 79, 81, 83, 84, 86, 88, 90, 92, 93, 94, 96, 98, 99, 103, 105, 107, 108, 112, 114, 117, 118, 121, 124, 126, 127, 129, 131, 132, 133, 134, 135, 138, 139, 141
Offset: 1

Views

Author

Antti Karttunen, Feb 05 2016

Keywords

Comments

Numbers n for which A083025(n) < A065339(n) or equally, for which A079635(n) < 0.
Closed under multiplication.

Examples

			45 = 3*3*5 is included as there are more prime factors of the form 4k+3 (here two 3's) than prime factors of the form 4k+1 (here just one 5).
		

Crossrefs

Complement: A268381.
Cf. also A072202, A268379.
Differs from A221264 for the first time at n=23, where a(23) = 45, a value missing from A221264.

Programs

  • Mathematica
    Position[Array[Map[Length, {Select[#, Mod[#, 4] == 1 &], Select[#, Mod[#, 4] == 3 &]}] &@ Flatten@ Apply[Table[#1, {#2}] &, FactorInteger@ #, 1] &, {141}], {a_, b_} /; a < b] // Flatten (* Michael De Vlieger, Feb 05 2016 *)
  • PARI
    isok(n) = {my(f = factor(n)); sum(k=1, #f~, ((f[k,1] % 4)==1)*f[k,2]) < sum(k=1, #f~, ((f[k,1] % 4)==3)*f[k,2]);} \\ Michel Marcus, Feb 05 2016

A268378 Numbers whose prime factorization includes at least one prime factor of form 4k+3 and any prime factor of the form 4k+1 has even multiplicity.

Original entry on oeis.org

3, 6, 7, 9, 11, 12, 14, 18, 19, 21, 22, 23, 24, 27, 28, 31, 33, 36, 38, 42, 43, 44, 46, 47, 48, 49, 54, 56, 57, 59, 62, 63, 66, 67, 69, 71, 72, 75, 76, 77, 79, 81, 83, 84, 86, 88, 92, 93, 94, 96, 98, 99, 103, 107, 108, 112, 114, 118, 121, 124, 126, 127, 129, 131, 132, 133, 134, 138, 139, 141, 142, 144, 147, 150
Offset: 1

Views

Author

Antti Karttunen, Feb 03 2016

Keywords

Comments

Closed under multiplication.

Examples

			6 = 2*3 is included, as there is a prime factor of the form 4k+3 present.
75 = 3 * 5 * 5 is included, as there is a prime factor of the form 4k+3 present and the prime factor of the form 4k+1 (5) is present twice.
		

Crossrefs

Subsequence of A268377.
Differs from A221264 for the first time at n=38, which here is a(38) = 75, a value missing from A221264.

Programs

  • Mathematica
    Select[Range@ 150, AnyTrue[#, Mod[First@ #, 4] == 3 &] && NoneTrue[#, And[Mod[First@ #, 4] == 1, OddQ@ Last@ #] &] &@ FactorInteger@ # &] (* Michael De Vlieger, Feb 04 2016, Version 10 *)
  • PARI
    isok(n) = {my(f = factor(n), nb3 = 0); for (i=1, #f~, if (((f[i,1] % 4) == 1) && (f[i,2] % 2), return (0)); if ((f[i,1] % 4) == 3, nb3++);); return (nb3);} \\ Michel Marcus, Feb 04 2016
Showing 1-5 of 5 results.