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.

A267099 Fully multiplicative involution swapping the positions of 4k+1 and 4k+3 primes: a(1) = 1; a(prime(k)) = A267101(k), a(x*y) = a(x)*a(y) for x, y > 1.

Original entry on oeis.org

1, 2, 5, 4, 3, 10, 13, 8, 25, 6, 17, 20, 7, 26, 15, 16, 11, 50, 29, 12, 65, 34, 37, 40, 9, 14, 125, 52, 19, 30, 41, 32, 85, 22, 39, 100, 23, 58, 35, 24, 31, 130, 53, 68, 75, 74, 61, 80, 169, 18, 55, 28, 43, 250, 51, 104, 145, 38, 73, 60, 47, 82, 325, 64, 21, 170, 89, 44, 185, 78, 97, 200, 59, 46, 45, 116, 221, 70, 101
Offset: 1

Views

Author

Antti Karttunen, Feb 01 2016

Keywords

Comments

Lexicographically earliest self-inverse permutation of natural numbers where each prime of the form 4k+1 is replaced by a prime of the form 4k+3 and vice versa, with the composite numbers determined by multiplicativity.
Fully multiplicative with a(p_n) = p_{A267100(n)} = A267101(n).
Maps each term of A004613 to some term of A004614, each (nonzero) term of A001481 to some term of A268377 and each term of A004431 to some term of A268378 and vice versa.
Sequences A072202 and A078613 are closed with respect to this permutation.

Crossrefs

Cf. A000035, A000040, A000720, A010051, A020639, A032742, A267100, A267101, A354102 (Möbius transform), A354103 (inverse Möbius transform), A354192 (fixed points).
Cf. also A108548.

Programs

  • PARI
    up_to = 2^16;
    A267097list(up_to) = { my(v=vector(up_to),i=0,c=0); forprime(p=2,prime(up_to), if(1==(p%4), c++); i++; v[i] = c); (v); };
    v267097 = A267097list(up_to);
    A267097(n) = v267097[n];
    A267098(n) = ((n-1)-A267097(n));
    list_primes_of_the_form(up_to,m,k) = { my(v=vector(up_to),i=0); forprime(p=2,, if(k==(p%m), i++; v[i] = p; if(i==up_to,return(v)))); };
    v002144 = list_primes_of_the_form(2*up_to,4,1);
    A002144(n) = v002144[n];
    v002145 = list_primes_of_the_form(2*up_to,4,3);
    A002145(n) = v002145[n];
    A267101(n) = if(1==n,2,if(1==(prime(n)%4),A002145(A267097(n)),A002144(A267098(n))));
    A267099(n) = { my(f=factor(n)); for(k=1,#f~,f[k,1] = A267101(primepi(f[k,1]))); factorback(f); }; \\ Antti Karttunen, May 18 2022
    (Scheme, with memoization-macro definec)
    (definec (A267099 n) (cond ((<= n 1) n) ((= 1 (A010051 n)) (A267101 (A000720 n))) (else (* (A267099 (A020639 n)) (A267099 (A032742 n))))))

Formula

a(1) = 1; after which, if n is k-th prime [= A000040(k)], then a(n) = A267101(k), otherwise a(A020639(n)) * a(A032742(n)).
Other identities. For all n >= 1:
a(A000040(n)) = A267101(n).
a(2*n) = 2*a(n).
a(3*n) = 5*a(n).
a(5*n) = 3*a(n).
a(7*n) = 13*a(n).
a(11*n) = 17*a(n).
etc. See examples in A267101.
A000035(n) = A000035(a(n)). [Preserves the parity of n.]
A005094(a(n)) = -A005094(n).
A079635(a(n)) = -A079635(n).

Extensions

Verbal description prefixed to the name by Antti Karttunen, May 19 2022

A072202 Same numbers of prime factors of forms 4*k+1 and 4*k+3, counted with multiplicity.

Original entry on oeis.org

1, 2, 4, 8, 15, 16, 30, 32, 35, 39, 51, 55, 60, 64, 70, 78, 87, 91, 95, 102, 110, 111, 115, 119, 120, 123, 128, 140, 143, 155, 156, 159, 174, 182, 183, 187, 190, 203, 204, 215, 219, 220, 222, 225, 230, 235, 238, 240, 246, 247, 256, 259, 267, 280, 286, 287, 291
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 03 2002

Keywords

Comments

Equivalently, numbers n such that A083025(n) = A065339(n), indices of zeros in A079635.
Closed under multiplication.
Closed with respect to permutation A267099. - Antti Karttunen, Feb 03 2016

Examples

			825 = 3*5*5*11 = [(4*0+3)*(4*2+3)]*[(4*1+1)*(4*1+1)], therefore 825 is a term.
		

Crossrefs

Primitive elements are {2} U A080774. - Franklin T. Adams-Watters, Dec 16 2011.
Subsequence of A078613 and of A268381.

Programs

  • Haskell
    a072202 n = a072202_list !! (n-1)
    a072202_list = [x | x <- [1..], a083025 x == a065339 x]
    -- Reinhard Zumkeller, Jan 10 2012
    
  • Mathematica
    f[n_]:=Plus@@Last/@Select[If[==1,{},FactorInteger[n]],Mod[#[[1]],4]==1&]; Table[f[n],{n,100}] (* Ray Chandler, Dec 18 2011 *)
  • 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
  • Scheme
    (define A072202 (ZERO-POS 1 1 A079635)) ;; [requires also my IntSeq-library] - Antti Karttunen, Feb 03 2016
    

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

A221264 Numbers having fewer distinct prime factors of form 4*k+1 than of 4*k+3.

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, 76, 77, 79, 81, 83, 84, 86, 88, 92, 93, 94, 96, 98, 99, 103, 105, 107, 108, 112, 114, 118, 121, 124, 126, 127, 129
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 07 2013

Keywords

Comments

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

Crossrefs

Programs

  • Haskell
    a221264 n = a221264_list !! (n-1)
    a221264_list = filter ((< 0) . a005094) [1..]
    
  • PARI
    is_A221264(n)={#(n=vecsort(factor(n>>valuation(n,2))[,1]%4))&&n[(1+#n)\2]==3} \\ M. F. Hasler, Dec 17 2014

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