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

A319690 Fully multiplicative with a(p^e) = (p mod 3)^e.

Original entry on oeis.org

1, 2, 0, 4, 2, 0, 1, 8, 0, 4, 2, 0, 1, 2, 0, 16, 2, 0, 1, 8, 0, 4, 2, 0, 4, 2, 0, 4, 2, 0, 1, 32, 0, 4, 2, 0, 1, 2, 0, 16, 2, 0, 1, 8, 0, 4, 2, 0, 1, 8, 0, 4, 2, 0, 4, 8, 0, 4, 2, 0, 1, 2, 0, 64, 2, 0, 1, 8, 0, 4, 2, 0, 1, 2, 0, 4, 2, 0, 1, 32, 0, 4, 2, 0, 4, 2, 0, 16, 2, 0, 1, 8, 0, 4, 2, 0, 1, 2, 0, 16, 2, 0, 1, 8, 0, 4, 2, 0, 1, 8, 0, 16, 2, 0, 4, 8, 0, 4
Offset: 1

Views

Author

Antti Karttunen, Oct 04 2018

Keywords

Crossrefs

Programs

  • PARI
    A319690(n) = { my(f=factor(n)); prod(i=1, #f~, (f[i, 1]%3)^f[i, 2]); };

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).

A319984 Fully multiplicative with a(p^e) = prime(p mod 4)^e.

Original entry on oeis.org

1, 3, 5, 9, 2, 15, 5, 27, 25, 6, 5, 45, 2, 15, 10, 81, 2, 75, 5, 18, 25, 15, 5, 135, 4, 6, 125, 45, 2, 30, 5, 243, 25, 6, 10, 225, 2, 15, 10, 54, 2, 75, 5, 45, 50, 15, 5, 405, 25, 12, 10, 18, 2, 375, 10, 135, 25, 6, 5, 90, 2, 15, 125, 729, 4, 75, 5, 18, 25, 30, 5, 675, 2, 6, 20, 45, 25, 30, 5, 162, 625, 6, 5, 225, 4, 15, 10, 135, 2, 150, 10, 45, 25, 15, 10
Offset: 1

Views

Author

Antti Karttunen, Oct 06 2018

Keywords

Comments

For all i, j:
A319714(i) = A319714(j) => a(i) = a(j) => A065338(i) = A065338(j).

Crossrefs

Programs

  • PARI
    A319984(n) = { my(f=factor(n)); prod(i=1, #f~, (prime(f[i, 1]%4))^f[i, 2]); };

Formula

For all n, A003963(a(n)) = A065338(n).

A246269 a(1) = 1, a(p(k)) = p(k+1) mod 4 for k-th prime p(k) and a(u * v) = a(u) * a(v) for u, v > 0.

Original entry on oeis.org

1, 3, 1, 9, 3, 3, 3, 27, 1, 9, 1, 9, 1, 9, 3, 81, 3, 3, 3, 27, 3, 3, 1, 27, 9, 3, 1, 27, 3, 9, 1, 243, 1, 9, 9, 9, 1, 9, 1, 81, 3, 9, 3, 9, 3, 3, 1, 81, 9, 27, 3, 9, 3, 3, 3, 81, 3, 9, 1, 27, 3, 3, 3, 729, 3, 3, 3, 27, 1, 27, 1, 27, 3, 3, 9, 27, 3, 3, 3, 243, 1, 9, 1, 27, 9, 9, 3, 27
Offset: 1

Views

Author

Antti Karttunen, Aug 21 2014

Keywords

Comments

This is a fully multiplicative sequence. Only powers of 3 (A000244) occur as terms.

Examples

			For n = 10 = 2*5 = p_1 * p_3 we have a(n) = (p_{1+1} mod 4)*(p_{3+1} mod 4) = (p_2 mod 4) * (p_4 mod 4) = (3 mod 4)*(7 mod 4) = 3*3 = 9.
		

Crossrefs

Programs

  • PARI
    default(primelimit, 2^22)
    A246269(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = (nextprime(f[i, 1]+1)%4)); factorback(f);
    for(n=1, 10080, write("b246269.txt", n, " ", A246269(n)));
    
  • Scheme
    (define (A246269 n) (A065338 (A003961 n)))

Formula

a(n) = A065338(A003961(n)).
a(n) = A000244(A246270(n)).

A240370 Positive integers n such that every element in the ring of integers modulo n can be written as the sum of two squares modulo n.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 25, 26, 29, 30, 31, 33, 34, 35, 37, 38, 39, 41, 42, 43, 46, 47, 50, 51, 53, 55, 57, 58, 59, 61, 62, 65, 66, 67, 69, 70, 71, 73, 74, 75, 77, 78, 79, 82, 83, 85, 86, 87, 89, 91, 93, 94, 95, 97, 101, 102, 103, 105, 106, 107, 109, 110, 111, 113, 114, 115, 118, 119, 122, 123, 125, 127, 129, 130, 131, 133, 134, 137, 138, 139, 141, 142, 143, 145, 146, 149, 150, 151, 154, 155, 157, 158, 159, 161, 163, 165, 166, 167, 169
Offset: 1

Views

Author

Keywords

Comments

Numbers n such that, if p^2 divides n for any prime p, then p = 1 mod 4.
Equivalently, squarefree numbers times A004613.
Thus, numbers k such that A065338(A057521(k)) = 1. - Antti Karttunen, Jun 21 2014
Different from A193304: terms 169, 289, 338, 507, 578, 841, 845, 867, ... are here but not in A193304. - Michel Marcus, Jun 20 2014
The asymptotic density of this sequence is 3/(8*K^2) = (3/4) * A243379 = 0.64208..., where K is the Landau-Ramanujan constant (A064533). - Amiram Eldar, Dec 19 2020

Examples

			In Z_7, 0^2 + 0^2 = 0, 1^2 + 0^2 = 1, 1^2 + 1^2 = 2, 3^2 + 1^2 = 3, 2^2 + 0^2 = 4, 2^2 + 1^2 = 5, 3^2 + 2^2 = 6. Therefore 7 is in the sequence.
In Z_8, there is no way to express 3 as a sum of two squares. Therefore 8 is not in the sequence.
		

Crossrefs

The subsequence A240109 is a version not allowing 0.
Different from A193304.
Complement of A053443. Subsequence of A192450.

Programs

  • Mathematica
    rad[n_] := Times @@ First /@ FactorInteger[n];
    a57521[n_] := n/Denominator[n/rad[n]^2];
    a65338[n_] := a65338[n] = If[n==1, 1, Mod[p = FactorInteger[n][[1, 1]], 4]* a65338[n/p]];
    Select[Range[200], a65338[a57521[#]] == 1&] (* Jean-François Alcover, Sep 22 2018, after Antti Karttunen *)
    Select[Range[200], AllTrue[FactorInteger[#], Mod[First[#1], 4] == 1 || Last[#1] == 1 &] &] (* Amiram Eldar, Dec 19 2020 *)
  • PARI
    is(n)=my(f=factor(n)); for(i=1,#f~,if(f[i,2]>1 && f[i,1]%4>1, return(0))); 1
    
  • PARI
    isok(n) = { if (n < 2, return (0)); if ((n % 4) == 0, return (0)); forprime(q = 2, n, if (((q % 4) == 3) && ((n % q) == 0) && ((n % q^2) == 0), return (0)); ); return (1); } \\ Michel Marcus, Jun 08 2014
    
  • Scheme
    ;; With Antti Karttunen's IntSeq-library.
    (define A240370 (MATCHING-POS 1 1 (lambda (k) (= 1 (A065338 (A057521 k))))))
    ;; Antti Karttunen, Jun 21 2014

A246349 Positions of records in A246272.

Original entry on oeis.org

1, 2, 6, 10, 30, 42, 210, 330, 462, 2310, 6090, 30030, 66990, 94710, 434910, 651630, 1292646, 1610070, 2478630, 2497110, 2916690, 13220130, 20930910, 52582530, 60690630
Offset: 1

Views

Author

Antti Karttunen, Aug 23 2014

Keywords

Comments

All terms are squarefree. (See the comments in A246272).
From 2 onward they factorize as: 2, 2*3, 2*5, 2*3*5, 2*3*7, 2*3*5*7, 2*3*5*11, 2*3*7*11, 2*3*5*7*11, 2*3*5*7*29, 2*3*5*7*11*13, 2*3*5*7*11*29, 2*3*5*7*11*41, 2*3*5*7*19*109, 2*3*5*7*29*107, 2*3*17*19*23*29, 2*3*5*7*11*17*41, 2*3*5*7*11*29*37, 2*3*5*7*11*23*47, 2*3*5*7*17*19*43, 2*3*5*7*11*59*97, 2*3*5*7*11*13*17*41, 2*3*5*7*11*13*17*103, 2*3*5*7*11*13*43*47, ...

Crossrefs

A246350 gives the corresponding record values.
Cf. A246272.

Programs

  • PARI
    default(primelimit, 2^22)
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Using code of Michel Marcus
    A065338(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = (f[i, 1]%4)); factorback(f);
    A246272(n) = {my(i); i=0; while((A065338(n)!=1), i++; n = A003961(n)); i};
    \\ Compute the b-files for both the positions of records (A246349) and their values (A246350) at the same time:
    prevmax = -1; i = 0; for(n=1, 60690630, if((k=A246272(n)) > prevmax, prevmax = k; i++; write("b246349.txt", i, " ", n); write("b246350.txt", i, " ", k)));
    (Scheme, with Antti Karttunen's IntSeq-library)
    (define A246349 (RECORD-POS 1 1 A246272))

A278265 a(n) = A278509(A276573(n)).

Original entry on oeis.org

3, 3, 1, 3, 3, 1, 9, 9, 3, 27, 3, 1, 3, 3, 1, 3, 9, 3, 3, 1, 3, 3, 27, 1, 3, 3, 9, 3, 3, 1, 3, 1, 3, 9, 9, 3, 27, 3, 9, 27, 3, 3, 9, 3, 3, 27, 1, 3, 3, 1, 3, 3, 9, 27, 1, 3, 3, 3, 1, 81, 9, 9, 27, 1, 3, 3, 3, 9, 81, 3, 3, 27, 1, 3, 27, 9, 9, 27, 3, 1, 3, 3, 27, 1, 3, 3, 243, 9, 3, 3, 3, 1, 3, 9, 9, 3, 27, 1, 3, 1, 3, 3, 3, 9, 3, 27, 1, 1, 9, 3, 9, 9, 3, 27, 3
Offset: 1

Views

Author

Antti Karttunen, Nov 28 2016

Keywords

Crossrefs

Programs

Formula

a(n) = A000265(A278498(n)).

A278509 a(n) = 3^{number of primes congruent to 3 modulo 4 dividing n (with multiplicity)}.

Original entry on oeis.org

1, 1, 3, 1, 1, 3, 3, 1, 9, 1, 3, 3, 1, 3, 3, 1, 1, 9, 3, 1, 9, 3, 3, 3, 1, 1, 27, 3, 1, 3, 3, 1, 9, 1, 3, 9, 1, 3, 3, 1, 1, 9, 3, 3, 9, 3, 3, 3, 9, 1, 3, 1, 1, 27, 3, 3, 9, 1, 3, 3, 1, 3, 27, 1, 1, 9, 3, 1, 9, 3, 3, 9, 1, 1, 3, 3, 9, 3, 3, 1, 81, 1, 3, 9, 1, 3, 3, 3, 1, 9, 3, 3, 9, 3, 3, 3, 1, 9, 27, 1, 1, 3, 3, 1, 9, 1, 3, 27, 1, 3, 3, 3, 1, 9, 3, 1, 9, 3, 3, 3
Offset: 1

Views

Author

Antti Karttunen, Nov 28 2016

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := Mod[p, 4]^e; f[2, e_] := 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Aug 13 2023 *)
  • Scheme
    (define (A278509 n) (A065338 (A000265 n)))

Formula

Fully multiplicative with a(p^e) = 1 if p = 2, (p mod 4)^e if p > 2.
a(n) = A065338(A000265(n)) = A000265(A065338(n)).
a(n) = A000244(A065339(n)) = 3^A065339(n).

A339875 Intersection of A137409 and A339870: Composite numbers k of the form 4u+1 having more than one prime factor of type 4u+3, and for which the odd part of phi(k) divides k-1.

Original entry on oeis.org

561, 6601, 8481, 17733, 23001, 30889, 54741, 62745, 88561, 106141, 319965, 359601, 449065, 534061, 609301, 949785, 1357621, 2162721, 2288661, 2615977, 3284281, 4005001, 4698001, 4830805, 5381265, 6313681, 6594721, 6840001, 8093701, 11782005, 11921001, 14665105, 14892153, 15217741, 16577785, 19683001, 20154061, 20441701
Offset: 1

Views

Author

Antti Karttunen, Dec 26 2020

Keywords

Comments

Composite numbers k of the form 4u+1 for which the odd part of phi(k) divides k-1 and for which A065338(k) > 1.
All terms k are squarefree and the 3-adic valuation of A065338(k) is a nonzero even number.

Crossrefs

Intersection of A137409 and A339870.

Programs

Previous Showing 11-19 of 19 results.