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

A278498 a(n) = A065338(A276573(n)).

Original entry on oeis.org

3, 6, 8, 3, 3, 16, 18, 9, 24, 27, 6, 32, 3, 6, 8, 3, 9, 48, 3, 1, 24, 3, 27, 64, 3, 6, 72, 3, 6, 16, 3, 1, 24, 18, 9, 96, 27, 6, 9, 108, 48, 3, 9, 24, 3, 54, 128, 3, 6, 8, 3, 3, 144, 27, 1, 24, 3, 6, 32, 162, 9, 72, 27, 1, 48, 3, 3, 18, 81, 192, 3, 54, 8, 3, 27, 18, 9, 216, 3, 1, 96, 3, 27, 1, 12, 48, 243, 9, 24, 3, 3, 256, 3, 9, 72, 3, 54, 16, 3, 1, 24, 3, 6
Offset: 1

Views

Author

Antti Karttunen, Nov 25 2016

Keywords

Crossrefs

Programs

Formula

a(n) = A065338(A276573(n)).

A003961 Completely multiplicative with a(prime(k)) = prime(k+1).

Original entry on oeis.org

1, 3, 5, 9, 7, 15, 11, 27, 25, 21, 13, 45, 17, 33, 35, 81, 19, 75, 23, 63, 55, 39, 29, 135, 49, 51, 125, 99, 31, 105, 37, 243, 65, 57, 77, 225, 41, 69, 85, 189, 43, 165, 47, 117, 175, 87, 53, 405, 121, 147, 95, 153, 59, 375, 91, 297, 115, 93, 61, 315, 67, 111, 275, 729, 119
Offset: 1

Views

Author

Keywords

Comments

Meyers (see Guy reference) conjectures that for all r >= 1, the least odd number not in the set {a(i): i < prime(r)} is prime(r+1). - N. J. A. Sloane, Jan 08 2021
Meyers' conjecture would be refuted if and only if for some r there were such a large gap between prime(r) and prime(r+1) that there existed a composite c for which prime(r) < c < a(c) < prime(r+1), in which case (by Bertrand's postulate) c would necessarily be a term of A246281. - Antti Karttunen, Mar 29 2021
a(n) is odd for all n and for each odd m there exists a k with a(k) = m (see A064216). a(n) > n for n > 1: bijection between the odd and all numbers. - Reinhard Zumkeller, Sep 26 2001
a(n) and n have the same number of distinct primes with (A001222) and without multiplicity (A001221). - Michel Marcus, Jun 13 2014
From Antti Karttunen, Nov 01 2019: (Start)
More generally, a(n) has the same prime signature as n, A046523(a(n)) = A046523(n). Also A246277(a(n)) = A246277(n) and A287170(a(n)) = A287170(n).
Many permutations and other sequences that employ prime factorization of n to encode either polynomials, partitions (via Heinz numbers) or multisets in general can be easily defined by using this sequence as one of their constituent functions. See the last line in the Crossrefs section for examples.
(End)

Examples

			a(12) = a(2^2 * 3) = a(prime(1)^2 * prime(2)) = prime(2)^2 * prime(3) = 3^2 * 5 = 45.
a(A002110(n)) = A002110(n + 1) / 2.
		

References

  • Richard K. Guy, editor, Problems From Western Number Theory Conferences, Labor Day, 1983, Problem 367 (Proposed by Leroy F. Meyers, The Ohio State U.).

Crossrefs

See A045965 for another version.
Row 1 of table A242378 (which gives the "k-th powers" of this sequence), row 3 of A297845 and of A306697. See also arrays A066117, A246278, A255483, A308503, A329050.
Cf. A064989 (a left inverse), A064216, A000040, A002110, A000265, A027746, A046523, A048673 (= (a(n)+1)/2), A108228 (= (a(n)-1)/2), A191002 (= a(n)*n), A252748 (= a(n)-2n), A286385 (= a(n)-sigma(n)), A283980 (= a(n)*A006519(n)), A341529 (= a(n)*sigma(n)), A326042, A049084, A001221, A001222, A122111, A225546, A260443, A245606, A244319, A246269 (= A065338(a(n))), A322361 (= gcd(n, a(n))), A305293.
Cf. A249734, A249735 (bisections).
Cf. A246261 (a(n) is of the form 4k+1), A246263 (of the form 4k+3), A246271, A246272, A246259, A246281 (n such that a(n) < 2n), A246282 (n such that a(n) > 2n), A252742.
Cf. A275717 (a(n) > a(n-1)), A275718 (a(n) < a(n-1)).
Cf. A003972 (Möbius transform), A003973 (Inverse Möbius transform), A318321.
Cf. A300841, A305421, A322991, A250469, A269379 for analogous shift-operators in other factorization and quasi-factorization systems.
Cf. also following permutations and other sequences that can be defined with the help of this sequence: A005940, A163511, A122111, A260443, A206296, A265408, A265750, A275733, A275735, A297845, A091202 & A091203, A250245 & A250246, A302023 & A302024, A302025 & A302026.
A version for partition numbers is A003964, strict A357853.
A permutation of A005408.
Applying the same transformation again gives A357852.
Other multiplicative sequences: A064988, A357977, A357978, A357980, A357983.
A056239 adds up prime indices, row-sums of A112798.

Programs

  • Haskell
    a003961 1 = 1
    a003961 n = product $ map (a000040 . (+ 1) . a049084) $ a027746_row n
    -- Reinhard Zumkeller, Apr 09 2012, Oct 09 2011
    (MIT/GNU Scheme, with Aubrey Jaffer's SLIB Scheme library)
    (require 'factor)
    (define (A003961 n) (apply * (map A000040 (map 1+ (map A049084 (factor n))))))
    ;; Antti Karttunen, May 20 2014
    
  • Maple
    a:= n-> mul(nextprime(i[1])^i[2], i=ifactors(n)[2]):
    seq(a(n), n=1..80);  # Alois P. Heinz, Sep 13 2017
  • Mathematica
    a[p_?PrimeQ] := a[p] = Prime[ PrimePi[p] + 1]; a[1] = 1; a[n_] := a[n] = Times @@ (a[#1]^#2& @@@ FactorInteger[n]); Table[a[n], {n, 1, 65}] (* Jean-François Alcover, Dec 01 2011, updated Sep 20 2019 *)
    Table[Times @@ Map[#1^#2 & @@ # &, FactorInteger[n] /. {p_, e_} /; e > 0 :> {Prime[PrimePi@ p + 1], e}] - Boole[n == 1], {n, 65}] (* Michael De Vlieger, Mar 24 2017 *)
  • PARI
    a(n)=local(f); if(n<1,0,f=factor(n); prod(k=1,matsize(f)[1],nextprime(1+f[k,1])^f[k,2]))
    
  • PARI
    a(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Michel Marcus, May 17 2014
    
  • Perl
    use ntheory ":all";  sub a003961 { vecprod(map { next_prime($) } factor(shift)); }  # _Dana Jacobsen, Mar 06 2016
    
  • Python
    from sympy import factorint, prime, primepi, prod
    def a(n):
        f=factorint(n)
        return 1 if n==1 else prod(prime(primepi(i) + 1)**f[i] for i in f)
    [a(n) for n in range(1, 11)] # Indranil Ghosh, May 13 2017

Formula

If n = Product p(k)^e(k) then a(n) = Product p(k+1)^e(k).
Multiplicative with a(p^e) = A000040(A000720(p)+1)^e. - David W. Wilson, Aug 01 2001
a(n) = Product_{k=1..A001221(n)} A000040(A049084(A027748(n,k))+1)^A124010(n,k). - Reinhard Zumkeller, Oct 09 2011 [Corrected by Peter Munn, Nov 11 2019]
A064989(a(n)) = n and a(A064989(n)) = A000265(n). - Antti Karttunen, May 20 2014 & Nov 01 2019
A001221(a(n)) = A001221(n) and A001222(a(n)) = A001222(n). - Michel Marcus, Jun 13 2014
From Peter Munn, Oct 31 2019: (Start)
a(n) = A225546((A225546(n))^2).
a(A225546(n)) = A225546(n^2).
(End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{p prime} ((p^2-p)/(p^2-nextprime(p))) = 2.06399637... . - Amiram Eldar, Nov 18 2022

A004613 Numbers that are divisible only by primes congruent to 1 mod 4.

Original entry on oeis.org

1, 5, 13, 17, 25, 29, 37, 41, 53, 61, 65, 73, 85, 89, 97, 101, 109, 113, 125, 137, 145, 149, 157, 169, 173, 181, 185, 193, 197, 205, 221, 229, 233, 241, 257, 265, 269, 277, 281, 289, 293, 305, 313, 317, 325, 337, 349, 353, 365, 373, 377, 389, 397, 401, 409, 421
Offset: 1

Views

Author

Keywords

Comments

Also gives solutions z to x^2+y^2=z^4 with gcd(x,y,z)=1 and x,y,z positive. - John Sillcox (johnsillcox(AT)hotmail.com), Feb 20 2004
A065338(a(n)) = 1. - Reinhard Zumkeller, Jul 10 2010
Product_{k=1..A001221(a(n))} A079260(A027748(a(n),k)) = 1. - Reinhard Zumkeller, Jan 07 2013
A062327(a(n)) = A000005(a(n))^2. (These are the only numbers that satisfy this equation.) - Benedikt Otten, May 22 2013
Numbers that are positive integer divisors of 1 + 4*x^2 where x is a positive integer. - Michael Somos, Jul 26 2013
Numbers k such that there is a "knight's move" of Euclidean distance sqrt(k) which allows the whole of the 2D lattice to be reached. For example, a knight which travels 4 units in any direction and then 1 unit at right angles to the first direction moves a distance sqrt(17) for each move. This knight can reach every square of an infinite chessboard.
Also 1/7 of the area of the n-th largest octagon with angles 3*Pi/4, along the perimeter of which there are only 8 nodes of the square lattice - at its vertices. - Alexander M. Domashenko, Feb 21 2024
Sequence closed under multiplication. Odd values of A031396 and their powers. These are the only numbers m that satisfy the Pell equation (k*x)^2 - D*(m*y)^2 = -1. - Klaus Purath, May 12 2025

References

  • David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989.

Crossrefs

Subsequence of A000404; A002144 is a subsequence. Essentially same as A008846.
Cf. A004614.

Programs

  • Haskell
    a004613 n = a004613_list !! (n-1)
    a004613_list = filter (all (== 1) . map a079260 . a027748_row) [1..]
    -- Reinhard Zumkeller, Jan 07 2013
  • Magma
    [n: n in [1..500] | forall{d: d in PrimeDivisors(n) | d mod 4 eq 1}]; // Vincenzo Librandi, Aug 21 2012
    
  • Maple
    isA004613 := proc(n)
        local p;
        for p in numtheory[factorset](n) do
            if modp(p,4) <> 1 then
                return false;
            end if;
        end do:
        true;
    end proc:
    for n from 1 to 200 do
        if isA004613(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Nov 17 2014
    # second Maple program:
    q:= n-> andmap(i-> irem(i[1], 4)=1, ifactors(n)[2]):
    select(q, [$1..500])[];  # Alois P. Heinz, Jan 13 2024
  • Mathematica
    ok[1] = True; ok[n_] := And @@ (Mod[#, 4] == 1 &) /@ FactorInteger[n][[All, 1]]; Select[Range[421], ok] (* Jean-François Alcover, May 05 2011 *)
    Select[Range[500],Union[Mod[#,4]&/@(FactorInteger[#][[All,1]])]=={1}&] (* Harvey P. Dale, Mar 08 2017 *)
  • PARI
    for(n=1,1000,if(sumdiv(n,d,isprime(d)*if((d-1)%4,1,0))==0,print1(n,",")))
    
  • PARI
    is(n)=n%4==1 && factorback(factor(n)[,1]%4)==1 \\ Charles R Greathouse IV, Sep 19 2016
    

Formula

Numbers of the form x^2 + y^2 where x is even, y is odd and gcd(x, y) = 1.

A276573 The infinite trunk of least squares beanstalk: The only infinite sequence such that a(0) = 0 and a(n-1) = a(n) - least number of squares (A002828) that sum to a(n).

Original entry on oeis.org

0, 3, 6, 8, 11, 15, 16, 18, 21, 24, 27, 30, 32, 35, 38, 40, 43, 45, 48, 51, 53, 56, 59, 63, 64, 67, 70, 72, 75, 78, 80, 83, 85, 88, 90, 93, 96, 99, 102, 105, 108, 112, 115, 117, 120, 123, 126, 128, 131, 134, 136, 139, 143, 144, 147, 149, 152, 155, 158, 160, 162, 165, 168, 171, 173, 176, 179, 183, 186, 189, 192, 195
Offset: 0

Views

Author

Antti Karttunen, Sep 07 2016

Keywords

Crossrefs

Cf. A002828, A005563, A255131, A260731, A260733, A262689, A276572, A276574, A276575 (first differences), A277016 (squares present), A277015 (their square roots), A277888 (primes), A278486 (numbers one more than a prime), A278265, A278487, A278488, A278491 (another subsequence), A278497, A278498, A278499, A278513, A278516, A278517, A278518, A278519, A278521, A278522.
Cf. A277890 & A277891 (number of even and odd terms in each range. The latter seem to be slightly more numerous), A277889.
Positions of nonzero terms in A278515.
Subsequence of A278489, no common terms with A278490.
Cf. also A179016, A259934, A276583, A276613, A276623 for similar constructions.

Programs

Formula

a(n) = A276574(A276572(n)).
Other identities and observations. For all n >= 0:
A260731(a(n)) = n.
a(A260733(n+1)) = A005563(n).
A278517(n) <= a(n) <= A278519(n).
A010873(a(n)) = A278499(n). [Terms reduced modulo 4.]
A010877(a(n)) = A278488(n). [modulo 8.]
A046523(a(n)) = A278497(n). [Least number with the same prime signature.]
A008683(a(n)) = A278513(n).
A065338(a(n)) = A278498(n).
A278509(a(n)) = A278265(n).
A278216(a(n)) = A278516(n). [Number of children the n-th node of the trunk has.]

Extensions

Definition clarified and more identities added to the Formula section by Antti Karttunen, Nov 28 2016

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

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

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

Original entry on oeis.org

1, 1, 3, 1, 1, 3, 7, 1, 9, 1, 11, 3, 1, 7, 3, 1, 1, 9, 19, 1, 21, 11, 23, 3, 1, 1, 27, 7, 1, 3, 31, 1, 33, 1, 7, 9, 1, 19, 3, 1, 1, 21, 43, 11, 9, 23, 47, 3, 49, 1, 3, 1, 1, 27, 11, 7, 57, 1, 59, 3, 1, 31, 63, 1, 1, 33, 67, 1, 69, 7, 71, 9, 1, 1, 3, 19, 77, 3, 79, 1, 81, 1, 83, 21
Offset: 1

Views

Author

Ralf Stephan, Aug 30 2004

Keywords

Comments

Largest term of A004614 that divides n. - Peter Munn, Apr 15 2021

Crossrefs

Equivalent sequence for distinct prime factors: A170819.
Equivalent sequences for prime factors of other forms: A000265 (2k+1), A170818 (4k+1), A072436 (not 4k+3), A248909 (6k+1), A343431 (6k+5).
Range of values: A004614.
Positions of 1's: A072437.

Programs

  • Maple
    a:= n-> mul(`if`(irem(i[1], 4)=3, i[1]^i[2], 1), i=ifactors(n)[2]):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 09 2014
  • Mathematica
    a[n_] := Product[{p, e} = pe; If[Mod[p, 4] == 3, p^e, 1], {pe, FactorInteger[n]}]; Array[a, 100] (* Jean-François Alcover, Jun 16 2015, updated May 29 2019 *)
  • 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]))
    
  • Python
    from sympy import factorint
    from operator import mul
    def a072436(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])
    def a(n): return n/a072436(n) # Indranil Ghosh, May 08 2017
    
  • Python
    from math import prod
    from sympy import factorint
    def A097706(n): return prod(p**e for p, e in factorint(n).items() if p & 3 == 3) # Chai Wah Wu, Jun 28 2022

Formula

a(n) = n/A072436(n).
a(A004614(n)) = A004614(n).
a(A072437(n)) = 1.
a(n) = A000265(n)/A170818(n). - Peter Munn, Apr 15 2021

A246272 Starting from n, the number of iterations of A003961 needed before the result has only prime factors of the form 4k+1 (a(1) = 0). [Where A003961(n) shifts the prime factorization of n one step towards larger primes].

Original entry on oeis.org

0, 2, 1, 2, 0, 5, 2, 2, 1, 9, 1, 5, 0, 2, 4, 2, 0, 5, 2, 9, 8, 2, 1, 5, 0, 6, 1, 2, 0, 23, 1, 2, 1, 5, 3, 5, 0, 2, 1, 9, 0, 49, 2, 2, 4, 9, 1, 5, 2, 9, 5, 6, 0, 5, 7, 2, 4, 2, 1, 23, 0, 2, 8, 2, 0, 5, 2, 5, 1, 9, 1, 5, 0, 6, 4, 2, 2, 23, 2, 9, 1, 5, 1, 49, 0, 2, 8, 2, 0, 23, 6, 9, 1, 6, 4, 5, 0, 2, 1, 9
Offset: 1

Views

Author

Antti Karttunen, Aug 21 2014

Keywords

Comments

Among the first 10000 terms, of which 4371 are primes, there are 92 distinct values in total (of which 23 are primes), the most common of them being: 1600 x 2, 1324 x 5, 1131 x 1, 1074 x 0, 571 x 4, 557 x 6, 538 x 9, 409 x 23, 404 x 3, 378 x 11, 211 x 8, 197 x 15, 131 x 12, 130 x 24, 128 x 49, 119 x 10, 95 x 7, 95 x 76, 92 x 22, 80 x 32, 70 x 14, 53 x 20, 47 x 77, 44 x 28, 29 x 17, 27 x 58, 24 x 21, 24 x 64, 23 x 13, 22 x 31, 22 x 39, 20 x 25, 19 x 48.
In contrast to A246271, here it holds that a(u) <= a(u*v) >= a(v) for any u, v. This follows because a number n has reached the "state of 4k+1 purity" (meaning that A065338(n) = 1) only if all its possible divisors have reached it as well.
This explains why for example 23 seems to be so common value. The reason is, that it occurs for the first time as a(30), and 30, being the third primorial is a product of three commonest primes: 30 = 2*3*5, thus for any n which is a multiple of 30, a(n) >= 23. Similarly a(42) = 49, a(84) = 49, a(126) = 49, so any number k which has 2, 3 and 7 as its prime factors must have a(k) >= 49.

Examples

			Consider n = 6 = 2*3 = p_1 * p_2. Five is the least number of iterations of A003961(n) (which increments by one the prime indices of prime factorization of n), before both primes are of the form 4k+1:
  p_2 = 3, p_3 = 5 (4k+3 & 4k+1),
  p_3 = 5, p_4 = 7 (4k+1 & 4k+3),
  p_4 = 7, p_5 = 11 (4k+3 & 4k+3),
  p_5 = 11, p_6 = 13 (4k+3 & 4k+1),
  p_6 = 13, p_7 = 17 (4k+1 & 4k+1),
thus a(6) = 5.
		

Crossrefs

A004613 gives the positions of zeros.
A246349 gives the positions of records and A246350 the corresponding values.

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};
    for(n=1, 10001, write("b246272.txt", n, " ", A246272(n)));
    
  • Scheme
    (define (A246272 n) (let loop ((i 0) (n n)) (if (= 1 (A065338 n)) i (loop (+ i 1) (A003961 n)))))
    
  • Scheme
    ;; Requires memoizing definec-macro.
    (definec (A246272 n) (if (= 1 (A065338 n)) 0 (+ 1 (A246272 (A003961 n)))))

Formula

If A065338(n) = 1, a(n) = 0, otherwise 1 + a(A003961(n)).
Other identities:
a(n) = a(A007947(n)) for all n. [Duplicate prime factors have no effect on the result].

A137409 Numbers that cannot be the value of 'C' in a primitive Pythagorean triple (A < B; A^2 + B^2 = C^2).

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 66, 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83
Offset: 1

Views

Author

Keywords

Comments

Complement of A008846. - R. J. Mathar, Aug 15 2010
A024362(a(n)) = 0. - Reinhard Zumkeller, Dec 02 2012
Except for the 1st term 1, complement of A004613. - Federico Provvedi, Jan 26 2019
After 1, numbers k for which A065338(k) > 1, i.e., after 1, numbers all of whose prime divisors are not of the form 4u+1. - Antti Karttunen, Dec 26 2020

Examples

			3,4,5; number 5 is not in this sequence.
5,12,13; number 13 is not in this sequence.
8,15,17; number 17 is not in this sequence.
7,24,25; number 25 is not in this sequence.
		

Crossrefs

Subsequences: A125667 (the odd terms), A339875.

Programs

  • Haskell
    import Data.List (elemIndices)
    a137409 n = a137409_list !! (n-1)
    a137409_list = map (+ 1) $ elemIndices 0 a024362_list
    -- Reinhard Zumkeller, Dec 02 2012
    
  • Mathematica
    okQ[1] = True;
    okQ[n_] := AnyTrue[FactorInteger[n][[All, 1]], Mod[#, 4] != 1&];
    Select[Range[100], okQ] (* Jean-François Alcover, Mar 10 2019, after Federico Provvedi's comment *)
  • PARI
    A065338(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = (f[i, 1]%4)); factorback(f); };
    isA137409(n) = ((1==n)||(A065338(n)>1)); \\ Antti Karttunen, Dec 26 2020

Extensions

Extended by R. J. Mathar, Aug 15 2010

A286363 Least number with the same prime signature as {the largest divisor of n with only prime factors of the form 4k+3} has: a(n) = A046523(A097706(n)).

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 2, 1, 4, 1, 2, 2, 1, 2, 2, 1, 1, 4, 2, 1, 6, 2, 2, 2, 1, 1, 8, 2, 1, 2, 2, 1, 6, 1, 2, 4, 1, 2, 2, 1, 1, 6, 2, 2, 4, 2, 2, 2, 4, 1, 2, 1, 1, 8, 2, 2, 6, 1, 2, 2, 1, 2, 12, 1, 1, 6, 2, 1, 6, 2, 2, 4, 1, 1, 2, 2, 6, 2, 2, 1, 16, 1, 2, 6, 1, 2, 2, 2, 1, 4, 2, 2, 6, 2, 2, 2, 1, 4, 12, 1, 1, 2, 2, 1, 6, 1, 2, 8, 1, 2, 2, 2, 1, 6, 2, 1, 4, 2, 2, 2
Offset: 1

Views

Author

Antti Karttunen, May 08 2017

Keywords

Crossrefs

Programs

  • Python
    from sympy import factorint
    from operator import mul
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def a072436(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])
    def a(n): return a046523(n/a072436(n)) # Indranil Ghosh, May 09 2017
  • Scheme
    (define (A286363 n) (A046523 (A097706 n)))
    

Formula

a(n) = A046523(A097706(n)).
a(n) = A286361(A267099(n)).
Showing 1-10 of 19 results. Next