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

A065339 Number of primes congruent to 3 modulo 4 dividing n (with multiplicity).

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 1, 0, 2, 0, 1, 1, 0, 1, 1, 0, 0, 2, 1, 0, 2, 1, 1, 1, 0, 0, 3, 1, 0, 1, 1, 0, 2, 0, 1, 2, 0, 1, 1, 0, 0, 2, 1, 1, 2, 1, 1, 1, 2, 0, 1, 0, 0, 3, 1, 1, 2, 0, 1, 1, 0, 1, 3, 0, 0, 2, 1, 0, 2, 1, 1, 2, 0, 0, 1, 1, 2, 1, 1, 0, 4, 0, 1, 2, 0, 1, 1, 1, 0, 2, 1, 1, 2, 1, 1, 1, 0, 2, 3, 0, 0, 1, 1, 0, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 29 2001

Keywords

Crossrefs

Programs

  • Haskell
    a065339 1 = 0
    a065339 n = length [x | x <- a027746_row n, mod x 4 == 3]
    -- Reinhard Zumkeller, Jan 10 2012
    
  • Maple
    A065339 := proc(n)
        a := 0 ;
        for f in ifactors(n)[2] do
            if op(1,f) mod 4 = 3 then
                a := a+op(2,f) ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Dec 16 2011
  • Mathematica
    f[n_]:=Plus@@Last/@Select[If[n==1,{},FactorInteger[n]],Mod[#[[1]],4]==3&]; Table[f[n],{n,100}] (* Ray Chandler, Dec 18 2011 *)
  • PARI
    A065339(n)=sum(i=1,#n=factor(n)~,if(n[1,i]%4==3,n[2,i]))  \\ M. F. Hasler, Apr 16 2012
    
  • Scheme
    ;; using memoization-macro definec
    (definec (A065339 n) (cond ((< n 3) 0) ((even? n) (A065339 (/ n 2))) (else (+ (/ (- (modulo (A020639 n) 4) 1) 2) (A065339 (A032742 n))))))
    ;; Antti Karttunen, Aug 14 2015
    
  • Scheme
    ;; using memoization-macro definec
    (definec (A065339 n) (cond ((< n 3) 0) ((even? n) (A065339 (/ n 2))) ((= 1 (modulo (A020639 n) 4)) (A065339 (A032742 n))) (else (+ (A067029 n) (A065339 (A028234 n))))))
    ;; Antti Karttunen, Aug 14 2015

Formula

a(n) = A001222(n) - A007814(n) - A083025(n).
(2^A007814(n)) * (3^a(n)) = A065338(n).
From Antti Karttunen, Aug 14 2015: (Start)
a(1) = a(2) = 0; thereafter, if n is even, a(n) = a(n/2), otherwise a(n) = ((A020639(n) mod 4)-1)/2 + a(n/A020639(n)). [Where A020639(n) gives the smallest prime factor of n.]
Other identities and observations. For all n >= 1:
a(n) = A007949(A065338(n)).
a(n) = A001222(A097706(n)).
a(n) >= A260728(n). [See A260730 for the positions of differences.] (End)
Totally additive with a(2) = 0, a(p) = 1 if p == 3 (mod 4), and a(p) = 0 if p == 1 (mod 4). - Amiram Eldar, Jun 17 2024

A378193 Rectangular array read by descending antidiagonals: row n shows the integers m such that the number of Pythagorean primes (including multiplicities) that divide m is n-1.

Original entry on oeis.org

1, 2, 5, 3, 10, 25, 4, 13, 50, 125, 6, 15, 65, 250, 625, 7, 17, 75, 325, 1250, 3125, 8, 20, 85, 375, 1625, 6250, 15625, 9, 26, 100, 425, 1875, 8125, 31250, 78125, 11, 29, 130, 500, 2125, 9375, 40625, 156250, 390625, 12, 30, 145, 650, 2500, 10625, 46875, 203125, 781250, 1953125
Offset: 1

Views

Author

Clark Kimberling, Jan 14 2025

Keywords

Comments

Every positive integer occurs exactly once.

Examples

			Corner:
     1     2     3     4      6       7
     5    10    13    15     17      20
    25    50    65    75     85     100
   125   250   325   375    425     500
   625  1250  1625  1875   2125    2500
  3125  6250  8125  9375  10625   12500
		

Crossrefs

Programs

  • Maple
    A378193 := proc(n,k)
        option remember;
        local a;
        if k = 0 then
           0;
        else
            for a from procname(n,k-1)+1 do
                if A083025(a) = n-1 then
                    return a;
                end if;
            end do;
        end if;
    end proc:
    seq(seq( A378193(n,d-n),n=1..d-1),d=2..10) ;
  • Mathematica
    u = Map[Map[#[[1]] &, #] &, GatherBy[
        SortBy[Map[{#, 1 + Count[Map[IntegerQ[(# - 1)/4] && PrimeQ[#] &,
                 Flatten[Map[ConstantArray[#[[1]], #[[2]]] &,
                 FactorInteger[#]]]], True]} &,
          Range[13000]], #[[2]] &], #[[2]] &]];
    r[m_] := Take[u[[m]], 6];
    w[m_, n_] := r[m][[n]];
    Grid[Table[w[m, n], {m, 1, 6}, {n, 1, 6}]] (* array *)
    Table[w[n - k + 1, k], {n, 6}, {k, n, 1, -1}] // Flatten  (* sequence *)
    (* Peter J. C. Moses, Nov 19 2024 *)
Showing 1-2 of 2 results.