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 12 results. Next

A292378 a(n) = 1 + A292377(n) - A292375(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 17 2017

Keywords

Comments

Locate the node which contains n in binary tree A005940 and traverse towards the root (which is 1), counting separately all numbers of the form 4k+1 and of the form 4k+3 that occur on the path (including also starting n itself, if it is of the either form), until 1 is reached, which however, is never included in the count of 4k+1. a(n) is the count of 4k+3 numbers minus the count of 4k+1 numbers that were encountered.

Crossrefs

Programs

  • Mathematica
    a[1, 1] = 1; a[1, 3] = 0; a[n_, k_] := a[n, k] = a[Which[n == 1, 1, EvenQ@ n, n/2, True, Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ n], k] + Boole[Mod[n, 4] == k]; Array[a[#, 3] - a[#, 1] &, 105] (* Michael De Vlieger, Sep 17 2017 *)
  • Scheme
    (define (A292378 n) (+ 1 (- (A292377 n) (A292375 n))))

Formula

a(n) = 1 + (A292377(n) - A292375(n)).
a(A000040(n)) = A038698(n).

A028982 Squares and twice squares.

Original entry on oeis.org

1, 2, 4, 8, 9, 16, 18, 25, 32, 36, 49, 50, 64, 72, 81, 98, 100, 121, 128, 144, 162, 169, 196, 200, 225, 242, 256, 288, 289, 324, 338, 361, 392, 400, 441, 450, 484, 512, 529, 576, 578, 625, 648, 676, 722, 729, 784, 800, 841, 882, 900, 961, 968, 1024
Offset: 1

Views

Author

Keywords

Comments

Numbers n such that sum of divisors of n (A000203) is odd.
Also the numbers with an odd number of run sums (trapezoidal arrangements, number of ways of being written as the difference of two triangular numbers). - Ron Knott, Jan 27 2003
Pell(n)*Sum_{k|n} 1/Pell(k) is odd, where Pell(n) is A000129(n). - Paul Barry, Oct 12 2005
Number of odd divisors of n (A001227) is odd. - Vladeta Jovovic, Aug 28 2007
A071324(a(n)) is odd. - Reinhard Zumkeller, Jul 03 2008
Sigma(a(n)) = A000203(a(n)) = A152677(n). - Jaroslav Krizek, Oct 06 2009
Numbers n such that sum of odd divisors of n (A000593) is odd. - Omar E. Pol, Jul 05 2016
A187793(a(n)) is odd. - Timothy L. Tiffin, Jul 18 2016
If k is odd (k = 2m+1 for m >= 0), then 2^k = 2^(2m+1) = 2*(2^m)^2. If k is even (k = 2m for m >= 0), then 2^k = 2^(2m) = (2^m)^2. So, the powers of 2 sequence (A000079) is a subsequence of this one. - Timothy L. Tiffin, Jul 18 2016
Numbers n such that A175317(n) = Sum_{d|n} pod(d) is odd, where pod(m) = the product of divisors of m (A007955). - Jaroslav Krizek, Dec 28 2016
Positions of zeros in A292377 and A292383, positions of ones in A286357 and A292583. (See A292583 for why.) - Antti Karttunen, Sep 25 2017
Numbers of the form A000079(i)*A016754(j), i,j>=0. - R. J. Mathar, May 30 2020
Equivalently, numbers whose odd part is square. Cf. A042968. - Peter Munn, Jul 14 2020
These are the Heinz numbers of the partitions counted by A119620. - Gus Wiseman, Oct 29 2021
Numbers m whose abundance, A033880(m), is odd. - Peter Munn, May 23 2022
Numbers with an odd number of middle divisors (cf. A067742). - Omar E. Pol, Aug 02 2022

Crossrefs

Complement of A028983.
Characteristic function is A053866, A093709.
Odd terms in A178910.
Supersequence of A000079.

Programs

  • Haskell
    import Data.List.Ordered (union)
    a028982 n = a028982_list !! (n-1)
    a028982_list = tail $ union a000290_list a001105_list
    -- Reinhard Zumkeller, Jun 27 2015
    
  • Mathematica
    Take[ Sort[ Flatten[ Table[{n^2, 2n^2}, {n, 35}] ]], 57] (* Robert G. Wilson v, Aug 27 2004 *)
  • PARI
    list(lim)=vecsort(concat(vector(sqrtint(lim\1),i,i^2), vector(sqrtint(lim\2),i,2*i^2))) \\ Charles R Greathouse IV, Jun 16 2011
    
  • Python
    from itertools import count, islice
    from sympy.ntheory.primetest import is_square
    def A028982_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:int(is_square(n) or is_square(n<<1)),count(max(startvalue,1)))
    A028982_list = list(islice(A028982_gen(),30)) # Chai Wah Wu, Jan 09 2023
    
  • Python
    from math import isqrt
    def A028982(n):
        def f(x): return n-1+x-isqrt(x)-isqrt(x>>1)
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Aug 22 2024

Formula

a(n) is asymptotic to c*n^2 with c = 2/(1+sqrt(2))^2 = 0.3431457.... - Benoit Cloitre, Sep 17 2002
In particular, a(n) = c*n^2 + O(n). - Charles R Greathouse IV, Jan 11 2013
a(A003152(n)) = n^2; a(A003151(n)) = 2*n^2. - Enrique Pérez Herrero, Oct 09 2013
Sum_{n>=1} 1/a(n) = Pi^2/4. - Amiram Eldar, Jun 28 2020

A292383 Base-2 expansion of a(n) encodes the steps where numbers of the form 4k+3 are encountered when map x -> A252463(x) is iterated down to 1, starting from x=n.

Original entry on oeis.org

0, 0, 1, 0, 2, 2, 5, 0, 0, 4, 11, 4, 22, 10, 5, 0, 44, 0, 89, 8, 8, 22, 179, 8, 0, 44, 1, 20, 358, 10, 717, 0, 20, 88, 11, 0, 1434, 178, 45, 16, 2868, 16, 5737, 44, 8, 358, 11475, 16, 0, 0, 89, 88, 22950, 2, 17, 40, 176, 716, 45901, 20, 91802, 1434, 17, 0, 40, 40, 183605, 176, 356, 22, 367211, 0, 734422, 2868, 1, 356, 22, 90, 1468845, 32, 0, 5736, 2937691, 32
Offset: 1

Views

Author

Antti Karttunen, Sep 15 2017

Keywords

Examples

			For n = 3, the starting value is of the form 4k+3, after which follows A252463(3) = 2, and A252463(2) = 1, the end point of iteration, and neither 2 nor 1 is of the form 4k+3, thus a(3) = 1*(2^0) + 0*(2^1) + 0*(2^2) = 1.
For n = 5, the starting value is not of the form 4k+3, after which follows A252463(5) = 3 (which is), continuing as before as 3 -> 2 -> 1, thus a(5) = 0*(2^0) + 1*(2^1) + 0*(2^2) + 0*(2^3) = 2.
For n = 10, the starting value is not of the form 4k+3, after which follows A252463(10) = 5 (also not 4k+3), and then A252463(5) = 3 (which is), continuing as before as 3 -> 2 -> 1, thus a(10) = 0*(2^0) + + 0*(2^1) + 1*(2^2) + 0*(2^3) + 0*(2^4) = 4.
		

Crossrefs

Programs

  • Mathematica
    Table[FromDigits[Reverse@ NestWhileList[Function[k, Which[k == 1, 1, EvenQ@ k, k/2, True, Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ k]], n, # > 1 &] /. k_ /; IntegerQ@ k :> If[Mod[k, 4] == 3, 1, 0], 2], {n, 84}] (* Michael De Vlieger, Sep 21 2017 *)
  • PARI
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A252463(n) = if(!(n%2),n/2,A064989(n));
    A292383(n) = if(1==n,0,(if(3==(n%4),1,0)+(2*A292383(A252463(n)))));
    
  • Scheme
    (define (A292383 n) (A292373 (A292384 n)))

Formula

a(1) = 0; for n > 1, a(n) = 2*a(A252463(n)) + [n ≡ 3 (mod 4)], where the last part of the formula is Iverson bracket, giving 1 only if n is of the form 4k+3, and 0 otherwise.
a(n) = A292373(A292384(n)).
a(n) = A292274(A243071(n)).
Other identities. For n >= 1:
a(2n) = 2*a(n).
a(n) + A292385(n) = A243071(n).
a(A163511(n)) = A292274(n).
A000120(a(n)) = A292377(n).

A292583 Restricted growth sequence transform of A278222(A292383(n)); a filter related to runs of numbers of the form 4k+3 encountered on trajectories of A005940-tree.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 3, 1, 1, 2, 4, 2, 4, 3, 3, 1, 4, 1, 5, 2, 2, 4, 6, 2, 1, 4, 2, 3, 6, 3, 7, 1, 3, 4, 4, 1, 7, 5, 5, 2, 7, 2, 8, 4, 2, 6, 9, 2, 1, 1, 5, 4, 9, 2, 3, 3, 4, 6, 10, 3, 10, 7, 3, 1, 3, 3, 11, 4, 5, 4, 12, 1, 12, 7, 2, 5, 4, 5, 13, 2, 1, 7, 14, 2, 5, 8, 7, 4, 14, 2, 4, 6, 6, 9, 6, 2, 14, 1, 15, 1, 14, 5, 16, 4, 3
Offset: 1

Views

Author

Antti Karttunen, Sep 20 2017

Keywords

Comments

Term a(n) essentially records the run lengths of numbers of form 4k+3 encountered when starting from that node in binary tree A005940 which contains n, and by then traversing towards the root by iterating the map n -> A252463(n). The actual run lengths can be read from the exponents of primes in the prime factorization of A278222(A292383(m)), where m = min_{k=1..n} for which a(k) = a(n). In compound filter A292584 this is combined with similar information about the run lengths of the numbers of the form 4k+1 (A292585).
From Antti Karttunen, Sep 25 2017: (Start)
For all i, j: a(i) = a(j) => A053866(i) = A053866(j).
This follows from the interpretation of A053866 (A093709) as the characteristic function of squares and twice-squares. In binary tree A005940 each number is "born" by repeated applications of two functions: when we descend leftward we apply A003961, which shifts all prime factors of n one step towards larger primes. On the other hand, when we descend rightward the terms grow by doubling: n -> 2n (A005843). No square is ever of the form 4k+3, and for any square x, A003961(x) is also a square. Multiplying a square by 2 gives twice a square, and then multiplying by 2 again gives 4*square, which is also a square. In general, applying an even number of doubling steps in succession keeps a square as a square, while an odd number of doubling steps gives twice a square. Applying A003961 to any 2*square gives 3*(some square) which is always of the form 4k+3. Moreover, after any such "wrong turn" in A005940-tree no square nor twice a square can ever be encountered under any of the further descendants, because with this process it is impossible to find a pair for the lone prime factor now present. On the other hand, when turning left from any (2^2k)*s (where s is a square), one again gets a square of the form (3^2k)*A003961(s). All this implies that there are no numbers of the form 4k+3 in any trajectory leading to a square or twice a square in A005940-tree, while all trajectories to any other kind of number contain at least one number of the form 4k+3. Because each a(n) in this sequence contains enough information to count the 4k+3 numbers encountered on a A005940-trajectory to n (being 1 iff there are none), this filter matches A053866.
(End)

Examples

			When traversing from the root of binary tree A005940 from the node containing 7, one obtains path 7 -> 5 -> 3 -> 2 -> 1. Of these numbers, 7 and 3 are of the form 4k+3, while others are not, thus there are two separate runs of length 1: [1, 1]. On the other hand, when traversing from 15 as 15 -> 6 -> 3 -> 2 -> 1, again only two terms are of the form 4k+3: 15 and 3 and they are not next to each other, so we have the same two runs of one each: [1, 1], thus a(7) and a(15) are allotted the same value by the restricted growth sequence transform, which in this case is 3. Note that 3 occurs in this sequence for the first time at n=7, with A292383(7) = 5 and A278222(5) = 6 = 2^1 * 3^1, where those run lengths 1 and 1 are the prime exponents of 6.
		

Crossrefs

Programs

  • PARI
    allocatemem(2^30);
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ Modified from code of M. F. Hasler
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A278222(n) = A046523(A005940(1+n));
    A252463(n) = if(!(n%2),n/2,A064989(n));
    A292383(n) = if(1==n,0,(if(3==(n%4),1,0)+(2*A292383(A252463(n)))));
    write_to_bfile(1,rgs_transform(vector(16384,n,A278222(A292383(n)))),"b292583_upto16384.txt");

A292375 a(1) = 1, and for n > 1, a(n) = a(A252463(n)) + [n == 1 (mod 4)].

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 3, 2, 1, 1, 4, 2, 4, 2, 3, 2, 4, 1, 3, 3, 1, 2, 5, 1, 5, 1, 3, 4, 1, 2, 6, 4, 2, 2, 7, 3, 7, 2, 2, 4, 7, 1, 4, 3, 3, 3, 8, 1, 3, 2, 5, 5, 8, 1, 9, 5, 2, 1, 4, 3, 9, 4, 5, 1, 9, 2, 10, 6, 2, 4, 2, 2, 10, 2, 2, 7, 10, 3, 3, 7, 4, 2, 11, 2, 3, 4, 6, 7, 3, 1, 12, 4, 2, 3, 13, 3, 13, 3, 2
Offset: 1

Views

Author

Antti Karttunen, Sep 17 2017

Keywords

Comments

For numbers > 1, iterate the map x -> A252463(x) which divides even numbers by 2, and shifts every prime in the prime factorization of odd n one index step towards smaller primes. a(n) counts the numbers of the form 4k+1 encountered until 1 has been reached, which is also included in the count. The count includes also n itself if it is of the form 4k+1 (A016813), thus a(1) = 1.
In other words, locate the node which contains n in binary tree A005940 and traverse from that node towards the root, counting all numbers of the form 4k+1 that occur on the path.

Crossrefs

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n] = a[Which[n == 1, 1, EvenQ@n, n/2, True, Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ n]] + Boole[Mod[n, 4] == 1]; Array[a, 105] (* Michael De Vlieger, Sep 17 2017 *)
  • PARI
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A292375(n) = if(1==n,n,if(!(n%2),A292375(n/2),(if(1==(n%4),1,0)+A292375(A064989(n)))));
    
  • Scheme
    ;; With memoization-macro definec.
    (definec (A292375 n) (if (= 1 n) 1 (+ (if (= 1 (modulo n 4)) 1 0) (A292375 (A252463 n)))))

Formula

a(1) = 1, a(2n) = a(n), and for odd numbers n > 1, a(n) = a(A064989(n)) + [n == 1 (mod 4)].
a(n) = A000120(A292381(n)).
Other identities and observations. For n >= 1:
a(n) >= A292374(n).
a(A000040(n))-1 = A267097(n).
1 + A292377(n) - a(n) = A292378(n).
For n >= 2, a(n) + A292377(n) = A061395(n).
From Antti Karttunen, Apr 22 2022: (Start)
For n >= 2, a(n^2) = A061395(n). [Because A292377(n^2) = 0]
For n >= 1, a(A001248(n)) = n. [See comments in A292583]
(End)

A292592 a(n) = A292590(A245612(n)).

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 2, 2, 0, 1, 0, 0, 4, 5, 4, 5, 0, 0, 2, 2, 0, 1, 0, 0, 8, 8, 10, 11, 8, 8, 10, 10, 0, 1, 0, 0, 4, 5, 4, 5, 0, 0, 2, 2, 0, 1, 0, 0, 16, 17, 16, 17, 20, 20, 22, 23, 16, 17, 16, 16, 20, 21, 20, 21, 0, 0, 2, 2, 0, 1, 0, 0, 8, 8, 10, 11, 8, 8, 10, 10, 0, 1, 0, 0, 4, 5, 4, 5, 0, 0, 2, 2, 0, 1, 0, 0, 32, 32, 34, 35, 32, 32, 34, 34, 40, 41, 40, 41
Offset: 0

Views

Author

Antti Karttunen, Sep 20 2017

Keywords

Comments

Because A292590(n) = a(A245611(n)), the sequence works as a "masking function" where the 1-bits in a(n) (always a subset of the 1-bits in binary expansion of n) indicate which numbers are multiples of 3 in binary tree A245612 on that trajectory which leads from the root of the tree to the node containing A245612(n). See the examples.

Examples

			A245612(18) = 188, that is, at "node address" 18 in binary tree A245612 sits number 188. 18 in binary is "10010", which when read from left to right (after the most significant bit which is always 1) gives the directions to follow in the tree when starting from the root, to land in node containing number 188. Here, after 1 and 2, turn left from 2, turn left from 5, turn right from 14 and then turn left from 63 and then indeed one lands in 188. These turns correspond with the four lowermost bits of the code, "0010". When one selects multiples of 3 from this path 1 -> 2 -> 5 -> 14 -> 63 -> 188, the only one is 63, which corresponds with the second rightmost bit (which also is the only 1-bit) in the code, which can be masked with 2 (binary "10"), thus a(18) = 2.
A245612(15) = 6, that is, at "node address" 15 in binary tree A245612 sits number 6. 15 in binary is "1111", which tells that 6 can be located in tree A245612 by going (after the initial root 1 and 2) three steps towards right from 2: 1 -> 2 -> 3 -> 4 -> 6. Of these numbers, only 3 and 6 are multiples of 3, thus the mask to obtain the corresponding bits from "1111" is "00101" (5 in binary), thus a(15) = 5.
A245612(31) = 7, that is, at "node address" 31 in binary tree A245612 sits number 7. 31 in binary is "11111", which tells that 7 can be located in tree A245612 by going (after the initial root 1 and 2) four steps towards right from 2: 1 -> 2 -> 3 -> 4 -> 6 -> 7. Of these numbers, only 3 and 6 are multiples of 3, thus the mask to obtain the corresponding bits from "11111" is "001010" (ten in binary), thus a(31) = 10.
		

Crossrefs

Cf. also A292377.
Differs from related A292274 for the first time at n=31, where a(31) = 10, while A292274(31) = 11. Compare also the scatter plots.

Programs

  • Mathematica
    f[n_] := f[n] = Which[n == 1, 0, Mod[n, 3] == 2, Ceiling[n/3], True, (Times @@ Power[If[# == 1, 1, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger[2 n - 1] + 1)/2]; g[n_] := g[n] = If[n == 1, 0, 2 g[f@ n] + Boole[Divisible[n, 3]]]; h[n_] := (Times @@ Power[If[# == 1, 1, NextPrime@ #] & /@ First@ #, Last@ #] + 1)/2 &@ Transpose@ FactorInteger@If[n == 0, 1, Prime[#] Product[ Prime[m]^(Map[ Ceiling[(Length@ # - 1)/2] &, DeleteCases[ Split@ Join[ Riffle[ IntegerDigits[n, 2], 0], {0}], {k__} /;k == 1]][[-m]]), {m, #}] &[DigitCount[n, 2, 1]]]; Array[g@ h@ # &, 108, 0] (* Michael De Vlieger, Sep 22 2017 *)

Formula

a(n) + A292593(n) = n, a(n) AND A292593(n) = 0.
a(n) AND n = a(n), where AND is bitwise-AND (A004198).

A332898 a(1) = 0, and for n > 1, a(n) = a(A332893(n)) + [n == 3 (mod 4)].

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 2, 0, 0, 1, 3, 1, 2, 2, 2, 0, 3, 0, 4, 1, 1, 3, 5, 1, 0, 2, 1, 2, 4, 2, 6, 0, 2, 3, 3, 0, 5, 4, 3, 1, 6, 1, 7, 3, 1, 5, 8, 1, 0, 0, 4, 2, 7, 1, 4, 2, 3, 4, 9, 2, 8, 6, 2, 0, 1, 2, 10, 3, 4, 3, 11, 0, 9, 5, 1, 4, 1, 3, 12, 1, 0, 6, 13, 1, 2, 7, 5, 3, 10, 1, 4, 5, 5, 8, 5, 1, 11, 0, 3, 0, 12, 4, 14, 2, 2
Offset: 1

Views

Author

Antti Karttunen, Mar 04 2020

Keywords

Comments

Starting from x=n, iterate the map x -> A332893(x) which divides even numbers by 2, and for odd n, changes every 4k+1 prime in the prime factorization to 4k+3 prime and vice versa (except 3 --> 2), like in A332819. a(n) counts the numbers of the form 4k+3 encountered until 1 has been reached. The count includes also n itself if it is of the form 4k+3 (A004767).
In other words, locate the node which contains n in binary tree A332815 and traverse from that node towards the root, counting all numbers of the form 4k+3 that occur on the path.

Crossrefs

Cf. A028982 (positions of zeros).
Cf. also A292377.

Programs

Formula

a(1) = 0, and for n > 1, a(n) = a(A332893(n)) + [n == 3 (mod 4)].
a(n) = A000120(A332896(n)).

A292584 Compound filter: a(n) = P(A292583(n), A292585(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 2, 5, 2, 8, 5, 13, 2, 4, 8, 19, 5, 25, 13, 9, 2, 32, 4, 41, 8, 12, 19, 51, 5, 16, 25, 5, 13, 72, 9, 85, 2, 18, 32, 14, 4, 98, 41, 26, 8, 112, 12, 128, 19, 8, 51, 145, 5, 46, 16, 33, 25, 180, 5, 18, 13, 49, 72, 200, 9, 220, 85, 13, 2, 24, 18, 242, 32, 60, 14, 265, 4, 288, 98, 8, 41, 19, 26, 313, 8, 4, 112, 339, 12, 33, 128, 62, 19, 365, 8, 25, 51, 84, 145
Offset: 1

Views

Author

Antti Karttunen, Sep 20 2017

Keywords

Comments

From Antti Karttunen, Sep 25 2017: (Start)
Some of the sequences this filter matches to:
For all i, j: a(i) = a(j) => A053866(i) = A053866(j).
For all i, j: a(i) = a(j) => A061395(i) = A061395(j). (also A006530, etc.)
For all i, j: a(i) = a(j) => A292378(i) = A292378(j).
The latter two implications follow simply because:
and, similarly, for n > 1,
and the sum of A292375(n) and A292377(n) is A061395(n) [index of the largest prime dividing n], while A292378 has been defined as 1 + their difference.
The case A053866 follows because of the component A292583, see comments under that entry. (End)

Crossrefs

Cf. also A006530, A061395, A292378 (some of the matched sequences).

Formula

a(n) = (1/2)*(2 + ((A292583(n)+A292585(n))^2) - A292583(n) - 3*A292585(n)).

A336121 a(1) = 0, and for n > 1, a(n) = [A122111(n) == 3 (mod 4)] + a(A253553(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jul 17 2020

Keywords

Comments

Positions for the first occurrence of each n, for n >= 0, are: 1, 4, 16, 32, 144, 512, 2048, 6912, 20736, 62208, ...

Crossrefs

Cf. A336119 (positions of zeros).

Programs

  • PARI
    A253553(n) = if(n<=2,1,my(f=factor(n), k=#f~); if(f[k,2]>1,f[k,2]--,f[k,1] = precprime(f[k,1]-1)); factorback(f));
    A336121(n) = if(1==n,0,(3==A336124(n))+A336121(A253553(n)));

Formula

a(1) = 0, and for n > 1, a(n) = [A336124(n) == 3] + a(A253553(n)).
a(n) = A000120(A336120(n)).
a(n) = A292377(A122111(n)).
a(n) = A001222(n) - A336123(n).

A292376 a(1) = 0, a(2n) = 0, and for odd numbers n > 1, a(n) = a(A064989(n)) + [n == 3 (mod 4)].

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 2, 0, 0, 0, 3, 0, 3, 0, 1, 0, 3, 0, 4, 0, 0, 0, 5, 0, 0, 0, 1, 0, 5, 0, 6, 0, 0, 0, 2, 0, 6, 0, 1, 0, 6, 0, 7, 0, 0, 0, 8, 0, 0, 0, 1, 0, 8, 0, 1, 0, 0, 0, 9, 0, 9, 0, 1, 0, 0, 0, 10, 0, 0, 0, 11, 0, 11, 0, 1, 0, 2, 0, 12, 0, 0, 0, 13, 0, 1, 0, 1, 0, 13, 0, 2, 0, 0, 0, 2, 0, 13, 0, 1, 0, 13, 0, 14, 0, 0
Offset: 1

Views

Author

Antti Karttunen, Sep 17 2017

Keywords

Comments

For odd numbers > 1, iterate the map x -> A064989(x), which shifts every prime in the prime factorization of n one index step towards smaller primes. a(n) counts the numbers of the form 4k+3 encountered until the first number which is even has been reached. This count includes also n itself if it is of the form 4k+3 (A004767).
In other words, locate the position where n is in square array A246278 and moving up by that column, count all numbers of the form 4k+3 before an even number at the top of the column is reached.

Crossrefs

Cf. also A038802 (odd bisection of a(n) + A292374(n)).

Programs

  • Mathematica
    a[1] = 0; a[n_] := a[n] = If[EvenQ@ n, 0, a[Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ n] + Boole[Mod[n, 4] == 3]]; Array[a, 105] (* Michael De Vlieger, Sep 17 2017 *)

Formula

a(1) = 0, a(2n) = 0, and for odd numbers n > 1, a(n) = a(A064989(n)) + floor((n mod 4)/3).
Other identities and observations. For n >= 1.
a(n) <= A292377(n).
For n >= 2, a(n) + A292374(n) + 1 = A055396(n).
Showing 1-10 of 12 results. Next