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

A246267 Permutation of natural numbers: a(n) = A048673(A246263(n))/2.

Original entry on oeis.org

1, 2, 4, 3, 7, 9, 5, 19, 6, 16, 14, 10, 34, 13, 25, 8, 61, 11, 12, 44, 22, 37, 24, 15, 94, 23, 29, 79, 17, 28, 69, 30, 49, 18, 43, 58, 169, 20, 31, 52, 36, 64, 21, 142, 124, 39, 88, 47, 40, 304, 91, 26, 27, 115, 223, 32, 51, 70, 46, 54, 86, 33, 547, 59, 219, 35, 109, 55, 38, 184, 119, 65, 41, 74, 80, 469, 42
Offset: 1

Views

Author

Antti Karttunen, Aug 21 2014

Keywords

Crossrefs

Inverse: A246268.
Cf. also A048673, A246263, A246265.

Programs

Formula

a(n) = A048673(A246263(n))/2.

A246264 Inverse function for injection A246263.

Original entry on oeis.org

0, 0, 1, 1, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 7, 8, 9, 10, 11, 12, 12, 13, 13, 14, 14, 15, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 19, 19, 20, 21, 21, 21, 21, 22, 23, 23, 24, 25, 26, 26, 27, 27, 27, 28, 29, 30, 31, 31, 32, 33, 34, 35, 35, 36, 36, 37, 38, 39, 39, 40, 41, 42
Offset: 0

Views

Author

Antti Karttunen, Aug 21 2014

Keywords

Crossrefs

Programs

Formula

a(n) = n - A246262(n).
Other identities. For all n >= 1 the following holds:
a(A246263(n)) = n. [This works as an inverse function for A246263].

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

A048673 Permutation of natural numbers: a(n) = (A003961(n)+1) / 2 [where A003961(n) shifts the prime factorization of n one step towards larger primes].

Original entry on oeis.org

1, 2, 3, 5, 4, 8, 6, 14, 13, 11, 7, 23, 9, 17, 18, 41, 10, 38, 12, 32, 28, 20, 15, 68, 25, 26, 63, 50, 16, 53, 19, 122, 33, 29, 39, 113, 21, 35, 43, 95, 22, 83, 24, 59, 88, 44, 27, 203, 61, 74, 48, 77, 30, 188, 46, 149, 58, 47, 31, 158, 34, 56, 138, 365, 60, 98, 36, 86, 73
Offset: 1

Views

Author

Antti Karttunen, Jul 14 1999

Keywords

Comments

Inverse of sequence A064216 considered as a permutation of the positive integers. - Howard A. Landman, Sep 25 2001
From Antti Karttunen, Dec 20 2014: (Start)
Permutation of natural numbers obtained by replacing each prime divisor of n with the next prime and mapping the generated odd numbers back to all natural numbers by adding one and then halving.
Note: there is a 7-cycle almost right in the beginning: (6 8 14 17 10 11 7). (See also comments at A249821. This 7-cycle is endlessly copied in permutations like A250249/A250250.)
The only 3-cycle in range 1 .. 402653184 is (2821 3460 5639).
For 1- and 2-cycles, see A245449.
(End)
The first 5-cycle is (1410, 2783, 2451, 2703, 2803). - Robert Israel, Jan 15 2015
From Michel Marcus, Aug 09 2020: (Start)
(5194, 5356, 6149, 8186, 10709), (46048, 51339, 87915, 102673, 137205) and (175811, 200924, 226175, 246397, 267838) are other 5-cycles.
(10242, 20479, 21413, 29245, 30275, 40354, 48241) is another 7-cycle. (End)
From Antti Karttunen, Feb 10 2021: (Start)
Somewhat artificially, also this permutation can be represented as a binary tree. Each child to the left is obtained by multiplying the parent by 3 and subtracting one, while each child to the right is obtained by applying A253888 to the parent:
1
|
................../ \..................
2 3
5......../ \........4 8......../ \........6
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
14 13 11 7 23 9 17 18
41 10 38 12 32 28 20 15 68 25 26 63 50 16 53 19
etc.
Each node's (> 1) parent can be obtained with A253889. Sequences A292243, A292244, A292245 and A292246 are constructed from the residues (mod 3) of the vertices encountered on the path from n to the root (1).
(End)

Examples

			For n = 6, as 6 = 2 * 3 = prime(1) * prime(2), we have a(6) = ((prime(1+1) * prime(2+1))+1) / 2 = ((3 * 5)+1)/2 = 8.
For n = 12, as 12 = 2^2 * 3, we have a(12) = ((3^2 * 5) + 1)/2 = 23.
		

Crossrefs

Inverse: A064216.
Row 1 of A251722, Row 2 of A249822.
One more than A108228, half the terms of A243501.
Fixed points: A048674.
Positions of records: A029744, their values: A246360 (= A007051 interleaved with A057198).
Positions of subrecords: A247283, their values: A247284.
Cf. A246351 (Numbers n such that a(n) < n.)
Cf. A246352 (Numbers n such that a(n) >= n.)
Cf. A246281 (Numbers n such that a(n) <= n.)
Cf. A246282 (Numbers n such that a(n) > n.), A252742 (their char. function)
Cf. A246261 (Numbers n for which a(n) is odd.)
Cf. A246263 (Numbers n for which a(n) is even.)
Cf. A246260 (a(n) reduced modulo 2), A341345 (modulo 3), A341346, A292251 (3-adic valuation), A292252.
Cf. A246342 (Iterates starting from n=12.)
Cf. A246344 (Iterates starting from n=16.)
Cf. A245447 (This permutation "squared", a(a(n)).)
Other permutations whose formulas refer to this sequence: A122111, A243062, A243066, A243500, A243506, A244154, A244319, A245605, A245608, A245610, A245612, A245708, A246265, A246267, A246268, A246363, A249745, A249824, A249826, and also A183209, A254103 that are somewhat similar.
Cf. also prime-shift based binary trees A005940, A163511, A245612 and A244154.
Cf. A253888, A253889, A292243, A292244, A292245 and A292246 for other derived sequences.
Cf. A323893 (Dirichlet inverse), A323894 (sum with it), A336840 (inverse Möbius transform).

Programs

  • Haskell
    a048673 = (`div` 2) . (+ 1) . a045965
    -- Reinhard Zumkeller, Jul 12 2012
    
  • Maple
    f:= proc(n)
    local F,q,t;
      F:= ifactors(n)[2];
      (1 + mul(nextprime(t[1])^t[2], t = F))/2
    end proc:
    seq(f(n),n=1..1000); # Robert Israel, Jan 15 2015
  • Mathematica
    Table[(Times @@ Power[If[# == 1, 1, NextPrime@ #] & /@ First@ #, Last@ #] + 1)/2 &@ Transpose@ FactorInteger@ n, {n, 69}] (* Michael De Vlieger, Dec 18 2014, revised Mar 17 2016 *)
  • PARI
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
    A048673(n) = (A003961(n)+1)/2; \\ Antti Karttunen, Dec 20 2014
    
  • PARI
    A048673(n) = if(1==n,n,if(n%2,A253888(A048673((n-1)/2)),(3*A048673(n/2))-1)); \\ (Not practical, but demonstrates the construction as a binary tree). - Antti Karttunen, Feb 10 2021
    
  • Python
    from sympy import factorint, nextprime, prod
    def a(n):
        f = factorint(n)
        return 1 if n==1 else (1 + prod(nextprime(i)**f[i] for i in f))//2 # Indranil Ghosh, May 09 2017
  • Scheme
    (define (A048673 n) (/ (+ 1 (A003961 n)) 2)) ;; Antti Karttunen, Dec 20 2014
    

Formula

From Antti Karttunen, Dec 20 2014: (Start)
a(1) = 1; for n>1: If n = product_{k>=1} (p_k)^(c_k), then a(n) = (1/2) * (1 + product_{k>=1} (p_{k+1})^(c_k)).
a(n) = (A003961(n)+1) / 2.
a(n) = floor((A045965(n)+1)/2).
Other identities. For all n >= 1:
a(n) = A108228(n)+1.
a(n) = A243501(n)/2.
A108951(n) = A181812(a(n)).
a(A246263(A246268(n))) = 2*n.
As a composition of other permutations involving prime-shift operations:
a(n) = A243506(A122111(n)).
a(n) = A243066(A241909(n)).
a(n) = A241909(A243062(n)).
a(n) = A244154(A156552(n)).
a(n) = A245610(A244319(n)).
a(n) = A227413(A246363(n)).
a(n) = A245612(A243071(n)).
a(n) = A245608(A245605(n)).
a(n) = A245610(A244319(n)).
a(n) = A249745(A249824(n)).
For n >= 2, a(n) = A245708(1+A245605(n-1)).
(End)
From Antti Karttunen, Jan 17 2015: (Start)
We also have the following identities:
a(2n) = 3*a(n) - 1. [Thus a(2n+1) = 0 or 1 when reduced modulo 3. See A341346]
a(3n) = 5*a(n) - 2.
a(4n) = 9*a(n) - 4.
a(5n) = 7*a(n) - 3.
a(6n) = 15*a(n) - 7.
a(7n) = 11*a(n) - 5.
a(8n) = 27*a(n) - 13.
a(9n) = 25*a(n) - 12.
and in general:
a(x*y) = (A003961(x) * a(y)) - a(x) + 1, for all x, y >= 1.
(End)
From Antti Karttunen, Feb 10 2021: (Start)
For n > 1, a(2n) = A016789(a(n)-1), a(2n+1) = A253888(a(n)).
a(2^n) = A007051(n) for all n >= 0. [A property shared with A183209 and A254103].
(End)
a(n) = A003602(A003961(n)). - Antti Karttunen, Apr 20 2022
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/4) * Product_{p prime} ((p^2-p)/(p^2-nextprime(p))) = 1.0319981... , where nextprime is A151800. - Amiram Eldar, Jan 18 2023

Extensions

New name and crossrefs to derived sequences added by Antti Karttunen, Dec 20 2014

A246261 Numbers n such that A003961(n) is of the form 4k+1.

Original entry on oeis.org

1, 3, 4, 9, 10, 11, 12, 13, 14, 16, 23, 25, 27, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40, 42, 44, 47, 48, 49, 52, 56, 58, 59, 64, 69, 71, 75, 81, 82, 83, 85, 86, 89, 90, 92, 93, 95, 97, 99, 100, 102, 105, 106, 107, 108, 109, 110, 111, 114, 117, 119, 120, 121, 122, 124, 126, 130, 131, 132, 133, 134, 136, 139, 140, 141, 143, 144
Offset: 1

Views

Author

Antti Karttunen, Aug 21 2014

Keywords

Comments

Equally: numbers n for which A048673(n) is odd.
Also, after 1, numbers n for which A243062(n) is even.

Crossrefs

Complement: A246263.
Positions of zeros in A246271.
Inverse function: A246262.
The first row of array A246259.

Programs

  • Mathematica
    {1}~Join~Select[Range[144], Mod[Times @@ Map[NextPrime[#1]^#2 & @@ # &, FactorInteger[#]], 4] == 1 &] (* Michael De Vlieger, Mar 12 2021 *)
  • Python
    from sympy import factorint, prime, primepi
    from operator import mul
    def a003961(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [prime(primepi(i) + 1)**f[i] for i in f])
    print([n for n in range(1, 201) if a003961(n)%4==1]) # Indranil Ghosh, Jun 12 2017

Formula

For all n >= 1, A246262(a(n)) = n.

A246271 Starting from A003961(n), the number of additional iterations of A003961 required for the result to be of the form 4k+1.

Original entry on oeis.org

0, 1, 0, 0, 2, 2, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 2, 1, 1, 2, 6, 1, 0, 2, 0, 2, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 2, 7, 0, 0, 0, 1, 1, 0, 1, 2, 5, 0, 2, 0, 0, 1, 2, 1, 1, 0, 1, 3, 1, 2, 0, 3, 0, 1, 2, 2, 0, 1, 1, 1, 1, 2, 0, 0, 0, 6, 0, 0, 6, 1, 0, 0, 4, 0, 0, 3, 0, 2, 0, 1, 0, 0, 2, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 1, 0, 2, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Antti Karttunen, Aug 21 2014

Keywords

Examples

			a(5) = 2, because exactly two additional iterations of A003961 are needed before A003961(5) = 7 is of the form 4k+1; as A003961(7) = 11 and A003961(11) = 13. (We have 7 = 3 mod 4, 11 = 3 mod 4 and 13 = 1 mod 4.)
		

Crossrefs

A246261 gives the positions of zeros, A246263 the positions of nonzeros.
A246280 the positions where n occurs for the first time, A246167 the positions of new distinct values.

Programs

  • PARI
    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
    A246271(n) = {my(i); i=0; n = A003961(n); while(((n%4)!=1), i++; n = A003961(n)); i};
    for(n=1, 10001, write("b246271.txt", n, " ", A246271(n)));
    (Scheme, two different variants, the second one employing memoizing definec-macro)
    (define (A246271 n) (let loop ((i 0) (n n)) (let ((next (A003961 n))) (if (= 1 (modulo next 4)) i (loop (+ i 1) next)))))
    (definec (A246271 n) (if (= 1 (A246260 n)) 0 (+ 1 (A246271 (A003961 n)))))

Formula

If A246260(n) = 1, a(n) = 0, otherwise 1 + a(A003961(n)).

A246363 Permutation of natural numbers: a(n) = A135141(A048673(n)).

Original entry on oeis.org

1, 2, 4, 8, 3, 9, 5, 13, 10, 16, 6, 14, 7, 12, 35, 20, 17, 79, 11, 67, 71, 33, 19, 271, 39, 31, 139, 87, 15, 30, 18, 311, 47, 34, 63, 74, 23, 29, 26, 351, 21, 28, 27, 24, 303, 69, 25, 2431, 70, 223, 135, 319, 37, 1663, 65, 58, 41, 38, 32, 219, 43, 127, 367, 327, 287, 239, 55, 107, 46, 283, 22, 413, 51, 53, 147
Offset: 1

Views

Author

Antti Karttunen, Aug 26 2014

Keywords

Comments

Apart from 2, even numbers occur only in positions given by A246261 (together with some odd numbers).
Also, apart from A246263(1) = 2, the positions given by the rest of A246263: 5, 6, 7, 8, 15, 17, 18, 19, 20, 21, ... contain odd numbers only.

Crossrefs

Inverse: A246364.
Related or similar permutations: A048673, A135141, A246365, A246367.

Programs

Formula

a(n) = A135141(A048673(n)).

A246364 Permutation of natural numbers: a(n) = A064216(A227413(n)).

Original entry on oeis.org

1, 2, 5, 3, 7, 11, 13, 4, 6, 9, 19, 14, 8, 12, 29, 10, 17, 31, 23, 16, 41, 71, 37, 44, 47, 39, 43, 42, 38, 30, 26, 59, 22, 34, 15, 85, 53, 58, 25, 130, 57, 151, 61, 311, 103, 69, 33, 365, 157, 111, 73, 226, 74, 106, 67, 370, 223, 56, 97, 341, 139, 122, 35, 133, 55, 86, 20, 145, 46, 49, 21, 659, 118, 36, 83, 419, 127, 191, 18
Offset: 1

Views

Author

Antti Karttunen, Aug 26 2014

Keywords

Comments

After a(2) = 2, the rest of the even bisection contains only terms of A246261. However, some of the terms of A246261 are also found in the odd bisection, while terms of A246263, apart from 2, all reside in the odd bisection of this sequence.

Crossrefs

Inverse: A246363.
Related or similar permutations: A064216, A227413, A246366, A246368.

Programs

Formula

a(n) = A064216(A227413(n)).

A286583 a(n) = A007814(A048673(n)).

Original entry on oeis.org

0, 1, 0, 0, 2, 3, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 2, 5, 2, 2, 0, 2, 0, 1, 0, 1, 4, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 0, 3, 2, 0, 0, 0, 1, 4, 0, 1, 2, 1, 0, 1, 0, 0, 1, 1, 3, 1, 0, 2, 1, 2, 1, 0, 2, 0, 1, 3, 1, 0, 3, 3, 7, 1, 2, 0, 0, 0, 3, 0, 0, 1, 4, 0, 0, 1, 0, 0, 4, 0, 5, 0, 1, 0, 0, 2, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 6
Offset: 1

Views

Author

Antti Karttunen, May 31 2017

Keywords

Crossrefs

Cf. A246261 (positions of zeros), A246263 (of nonzeros).

Programs

  • PARI
    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
    A048673(n) = (A003961(n)+1)/2;
    A007814(n) = (valuation(n,2));
    A286583(n) = A007814(A048673(n));
    
  • Python
    from sympy import factorint, nextprime, prod
    def a007814(n): return 1 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
    def a048673(n):
        f = factorint(n)
        return 1 if n==1 else (1 + prod(nextprime(i)**f[i] for i in f))//2
    def a(n): return a007814(a048673(n)) # Indranil Ghosh, Jun 12 2017
  • Scheme
    (define (A286583 n) (A007814 (A048673 n)))
    

Formula

a(n) = A007814(A048673(n)).

A269860 Numbers n such that n and A048673(n) are of the same parity.

Original entry on oeis.org

1, 2, 3, 6, 8, 9, 11, 13, 18, 20, 22, 23, 24, 25, 26, 27, 28, 31, 32, 33, 35, 37, 39, 46, 47, 49, 50, 54, 59, 60, 62, 66, 68, 69, 70, 71, 72, 74, 75, 76, 78, 80, 81, 83, 84, 85, 88, 89, 93, 94, 95, 96, 97, 98, 99, 104, 105, 107, 109, 111, 112, 116, 117, 118, 119, 121, 128, 131, 133, 138, 139, 141, 142, 143, 145, 147, 150
Offset: 1

Views

Author

Antti Karttunen, Mar 16 2016

Keywords

Comments

Union of odd terms of A246261 and even terms of A246263.

Crossrefs

Complement: A269861.
Cf. A048674 (a subsequence).
Cf. also A270430.

Programs

  • Mathematica
    f[n_] := (Times @@ Power[If[# == 1, 1, NextPrime@ #] & /@ First@ #, Last@ #] + 1)/2 &@ Transpose@ FactorInteger@ n; Select[Range@ 150, Xor[EvenQ@ f@ #, OddQ@ #] &] (* Michael De Vlieger, Mar 17 2016 *)
Showing 1-10 of 14 results. Next