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

A332212 Fully multiplicative with a(p) = A332211(A000720(p)).

Original entry on oeis.org

1, 2, 3, 4, 7, 6, 5, 8, 9, 14, 31, 12, 11, 10, 21, 16, 127, 18, 13, 28, 15, 62, 17, 24, 49, 22, 27, 20, 19, 42, 23, 32, 93, 254, 35, 36, 29, 26, 33, 56, 8191, 30, 37, 124, 63, 34, 41, 48, 25, 98, 381, 44, 43, 54, 217, 40, 39, 38, 131071, 84, 47, 46, 45, 64, 77, 186, 524287, 508, 51, 70, 53, 72, 59, 58, 147, 52, 155, 66, 61, 112, 81, 16382, 67, 60
Offset: 1

Views

Author

Antti Karttunen, Feb 09 2020

Keywords

Crossrefs

Cf. A000043, A000668, A000720, A332211, A332213 (inverse permutation), A332214.

Programs

  • PARI
    \\ Needs also code from A332211:
    A332212(n) = { my(f=factor(n)); f[,1] = apply(A332211,apply(primepi,f[,1])); factorback(f); };

Formula

a(1) = 1, a(p^e) = A332211(A000720(p))^e, a(m*n) = a(m)*a(n).

A332210 Permutation of primes, inverse of A332211.

Original entry on oeis.org

2, 3, 7, 5, 13, 19, 23, 29, 31, 37, 11, 43, 47, 53, 61, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 131, 137, 139, 149, 17, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383
Offset: 1

Views

Author

Antti Karttunen, Feb 09 2020

Keywords

Comments

Sequence is well-defined also in case there are only a finite number of Mersenne primes.

Crossrefs

Used to construct permutations A332213, A332215.

Programs

  • PARI
    up_to = 127;
    A332210list(up_to) = { my(lista=List([]), xs=Map(), i=1, q, u); for(n=1,up_to, if(!isprime(q=((2^n)-1)), while(mapisdefined(xs,prime(i)), i++); q = prime(i)); mapput(xs,q,n)); for(i=1,oo,if(!mapisdefined(xs,prime(i),&u),return(Vec(lista)),listput(lista,prime(u)))); };
    \\ For computing a larger number of terms, use the precomputed values of A000043:
    v000043 = [2,3,5,7,13,17,19,31,61,89,107,127,521,607,1279, 2203,2281,3217,4253,4423,9689,9941,11213,19937, 21701,23209,44497,86243,110503,132049,216091, 756839,859433,1257787,1398269,2976221,3021377, 6972593,13466917,20996011,24036583,25964951, 30402457,32582657,37156667,42643801,43112609];
    A332210list(up_to) = { my(lista=List([]), xs=Map(), m000043 = Map(), i=1, q, u); for(k=1,#v000043,mapput(m000043,v000043[k],k)); for(n=1,min(up_to,v000043[#v000043]), if(mapisdefined(m000043,n), q = (2^n)-1, while(mapisdefined(xs,prime(i)), i++); q = prime(i)); mapput(xs,q,n)); for(i=1,oo,if(!mapisdefined(xs,prime(i),&u),return(Vec(lista)),listput(lista,prime(u)))); };
    v332210 = A332210list(up_to);
    A332210(n) = v332210[n];

Formula

For all applicable n >= 1, a(A059305(n)) = a(A000720(A000668(n))) = A000040(A000043(n)).

A163511 a(0)=1. a(n) = p(A000120(n)) * Product_{m=1..A000120(n)} p(m)^A163510(n,m), where p(m) is the m-th prime.

Original entry on oeis.org

1, 2, 4, 3, 8, 9, 6, 5, 16, 27, 18, 25, 12, 15, 10, 7, 32, 81, 54, 125, 36, 75, 50, 49, 24, 45, 30, 35, 20, 21, 14, 11, 64, 243, 162, 625, 108, 375, 250, 343, 72, 225, 150, 245, 100, 147, 98, 121, 48, 135, 90, 175, 60, 105, 70, 77, 40, 63, 42, 55, 28, 33, 22, 13, 128
Offset: 0

Views

Author

Leroy Quet, Jul 29 2009

Keywords

Comments

This is a permutation of the positive integers.
From Antti Karttunen, Jun 20 2014: (Start)
Note the indexing: the domain starts from 0, while the range excludes zero, thus this is neither a bijection on the set of nonnegative integers nor on the set of positive natural numbers, but a bijection from the former set to the latter.
Apart from that discrepancy, this could be viewed as yet another "entanglement permutation" where the two complementary pairs to be interwoven together are even and odd numbers (A005843/A005408) which are entangled with the complementary pair even numbers (taken straight) and odd numbers in the order they appear in A003961: (A005843/A003961). See also A246375 which has almost the same recurrence.
Note how the even bisection halved gives the same sequence back. (For a(0)=1, take ceiling of 1/2).
(End)
From Antti Karttunen, Dec 30 2017: (Start)
This irregular table can be represented as a binary tree. Each child to the left is obtained by doubling the parent, and each child to the right is obtained by applying A003961 to the parent:
1
|
...................2...................
4 3
8......../ \........9 6......../ \........5
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
16 27 18 25 12 15 10 7
32 81 54 125 36 75 50 49 24 45 30 35 20 21 14 11
etc.
Sequence A005940 is obtained by scanning the same tree level by level in mirror image fashion. Also in binary trees A253563 and A253565 the terms on level of the tree are some permutation of the terms present on the level n of this tree. A252464(n) gives the distance of n from 1 in all these trees, and A252463 gives the parent of the node containing n.
A252737(n) gives the sum and A252738(n) the product of terms on row n (where 1 is on row 0, 1 on row 1, 3 and 4 on row 2, etc.). A252745(n) gives the number of nodes on level n whose left child is smaller than the right child, and A252744(n) is an indicator function for those nodes.
(End)
Note that the idea behind maps like this (and the mirror image A005940) admits also using alternative orderings of primes, not just standard magnitude-wise ordering (A000040). For example, A332214 is a similar sequence but with primes rearranged as in A332211, and A332817 is obtained when primes are rearranged as in A108546. - Antti Karttunen, Mar 11 2020
From Lorenzo Sauras Altuzarra, Nov 28 2020: (Start)
This sequence is generated from A228351 by applying the following procedure: 1) eliminate the compositions that end in one unless the first one, 2) subtract one unit from every component, 3) replace every tuple [t_1, ..., t_r] by Product_{k=1..r} A000040(k)^(t_k) (see the examples).
Is it true that a(n) = A337909(n+1) if and only if a(n+1) is not a term of A161992?
Does this permutation have any other cycle apart from (1), (2) and (6, 9, 16, 7)? (End)
From Antti Karttunen, Jul 25 2023: (Start)
(In the above question, it is assumed that the starting offset would be 1 instead of 0).
Questions:
Does a(n) = 1+A054429(n) hold only when n is of the form 2^k times 1, 3 or 7, i.e., one of the terms of A029748?
It seems that A007283 gives all fixed points of map n -> a(n), like A335431 seems to give all fixed points of map n -> A332214(n). Is there a general rule for mappings like these that the fixed points (if they exist) must be of the form 2^k times a certain kind of prime, i.e., that any odd composite (times 2^k) can certainly be excluded? See also note in A029747.
(End)
If the conjecture given in A364297 holds, then it implies the above conjecture about A007283. See also A364963. - Antti Karttunen, Sep 06 2023
Conjecture: a(n^k) is never of the form x^k, for any integers n > 0, k > 1, x >= 1. This holds at least for squares, cubes, seventh and eleventh powers (see A365808, A365801, A366287 and A366391). - Antti Karttunen, Sep 24 2023, Oct 10 2023.
See A365805 for why the above holds for any n^k, with k > 1. - Antti Karttunen, Nov 23 2023

Examples

			For n=3, whose binary representation is "11", we have A000120(3)=2, with A163510(3,1) = A163510(3,2) = 0, thus a(3) = p(2) * p(1)^0 * p(2)^0 = 3*1*1 = 3.
For n=9, "1001" in binary, we have A000120(9)=2, with A163510(9,1) = 0 and A163510(9,2) = 2, thus a(9) = p(2) * p(1)^0 * p(2)^2 = 3*1*9 = 27.
For n=10, "1010" in binary, we have A000120(10)=2, with A163510(10,1) = 1 and A163510(10,2) = 1, thus a(10) = p(2) * p(1)^1 * p(2)^1 = 3*2*3 = 18.
For n=15, "1111" in binary, we have A000120(15)=4, with A163510(15,1) = A163510(15,2) = A163510(15,3) = A163510(15,4) = 0, thus a(15) = p(4) * p(1)^0 * p(2)^0 * p(3)^0 * p(4)^0 = 7*1*1*1*1 = 7.
[1], [2], [1,1], [3], [1,2], [2,1] ... -> [1], [2], [3], [1,2], ... -> [0], [1], [2], [0,1], ... -> 2^0, 2^1, 2^2, 2^0*3^1, ... = 1, 2, 4, 3, ... - _Lorenzo Sauras Altuzarra_, Nov 28 2020
		

Crossrefs

Inverse: A243071.
Cf. A007283 (known positions where a(n)=n), A029747, A029748, A364255 [= gcd(n,a(n))], A364258 [= a(n)-n], A364287 (where a(n) < n), A364292 (where a(n) <= n), A364494 (where n|a(n)), A364496 (where a(n)|n), A364963, A364297.
Cf. A365808 (positions of squares), A365801 (of cubes), A365802 (of fifth powers), A365805 [= A052409(a(n))], A366287, A366391.
Cf. A005940, A332214, A332817, A366275 (variants).

Programs

  • Mathematica
    f[n_] := Reverse@ Map[Ceiling[(Length@ # - 1)/2] &, DeleteCases[Split@ Join[Riffle[IntegerDigits[n, 2], 0], {0}], {k__} /; k == 1]]; {1}~Join~
    Table[Function[t, Prime[t] Product[Prime[m]^(f[n][[m]]), {m, t}]][DigitCount[n, 2, 1]], {n, 120}] (* Michael De Vlieger, Jul 25 2016 *)
  • Python
    from sympy import prime
    def A163511(n):
        if n:
            k, c, m = n, 0, 1
            while k:
                c += 1
                m *= prime(c)**(s:=(~k&k-1).bit_length())
                k >>= s+1
            return m*prime(c)
        return 1 # Chai Wah Wu, Jul 17 2023

Formula

For n >= 1, a(2n) is even, a(2n+1) is odd. a(2^k) = 2^(k+1), for all k >= 0.
From Antti Karttunen, Jun 20 2014: (Start)
a(0) = 1, a(1) = 2, a(2n) = 2*a(n), a(2n+1) = A003961(a(n)).
As a more general observation about the parity, we have:
For n >= 1, A007814(a(n)) = A135523(n) = A007814(n) + A209229(n). [This permutation preserves the 2-adic valuation of n, except when n is a power of two, in which cases that value is incremented by one.]
For n >= 1, A055396(a(n)) = A091090(n) = A007814(n+1) + 1 - A036987(n).
For n >= 1, a(A000225(n)) = A000040(n).
(End)
From Antti Karttunen, Oct 11 2014: (Start)
As a composition of related permutations:
a(n) = A005940(1+A054429(n)).
a(n) = A064216(A245612(n))
a(n) = A246681(A246378(n)).
Also, for all n >= 0, it holds that:
A161511(n) = A243503(a(n)).
A243499(n) = A243504(a(n)).
(End)
More linking identities from Antti Karttunen, Dec 30 2017: (Start)
A046523(a(n)) = A278531(n). [See also A286531.]
A278224(a(n)) = A285713(n). [Another filter-sequence.]
A048675(a(n)) = A135529(n) seems to hold for n >= 1.
A250245(a(n)) = A252755(n).
A252742(a(n)) = A252744(n).
A245611(a(n)) = A253891(n).
A249824(a(n)) = A275716(n).
A292263(a(n)) = A292264(n). [A292944(n) + A292264(n) = n.]
--
A292383(a(n)) = A292274(n).
A292385(a(n)) = A292271(n). [A292271(n) + A292274(n) = n.]
--
A292941(a(n)) = A292942(n).
A292943(a(n)) = A292944(n).
A292945(a(n)) = A292946(n). [A292942(n) + A292944(n) + A292946(n) = n.]
--
A292253(a(n)) = A292254(n).
A292255(a(n)) = A292256(n). [A292944(n) + A292254(n) + A292256(n) = n.]
--
A279339(a(n)) = A279342(n).
a(A071574(n)) = A269847(n).
a(A279341(n)) = A279338(n).
a(A252756(n)) = A250246(n).
(1+A008836(a(n)))/2 = A059448(n).
(End)
From Antti Karttunen, Jul 26 2023: (Start)
For all n >= 0, a(A007283(n)) = A007283(n).
A001222(a(n)) = A290251(n).
(End)

Extensions

More terms computed and examples added by Antti Karttunen, Jun 20 2014

A108546 Lexicographically earliest permutation of primes such that for n>1 forms 4*k+1 and 4*k+3 alternate.

Original entry on oeis.org

2, 3, 5, 7, 13, 11, 17, 19, 29, 23, 37, 31, 41, 43, 53, 47, 61, 59, 73, 67, 89, 71, 97, 79, 101, 83, 109, 103, 113, 107, 137, 127, 149, 131, 157, 139, 173, 151, 181, 163, 193, 167, 197, 179, 229, 191, 233, 199, 241, 211, 257, 223, 269, 227, 277, 239, 281, 251, 293
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 10 2005

Keywords

Crossrefs

Cf. A000040, A002144, A002145, A102261, A108547 (fixed points), A108548, A111745, A332806 (inverse), A332807.
Cf. also A267101, A332211.

Programs

  • Haskell
    import Data.List (transpose)
    a108546 n = a108546_list !! (n-1)
    a108546_list =  2 : concat
       (transpose [a002145_list, a002144_list])
    -- Reinhard Zumkeller, Nov 13 2014, Feb 22 2011
    
  • Mathematica
    terms = 60; A111745 = Module[{prs = Prime[Range[2terms]], m3, m1, min}, m3 = Select[prs, Mod[#, 4] == 3&]; m1 = Select[prs, Mod[#, 4] == 1&]; min = Min[Length[m1], Length[m3]]; Riffle[Take[m3, min], Take[m1, min]]]; a[1] = 2; a[n_] := A111745[[n-1]]; Table[a[n], {n, 1, terms}] (* Jean-François Alcover, May 18 2017, using Harvey P. Dale's code for A111745 *)
  • PARI
    up_to = 10000;
    A108546list(up_to) = { my(v=vector(up_to), p,q); v[1] = 2; v[2] = 3; v[3] = 5; for(n=4,up_to, p = v[n-2]; q = nextprime(1+p); while(q%4 != p%4, q=nextprime(1+q)); v[n] = q); (v); };
    v108546 = A108546list(up_to);
    A108546(n) = v108546[n]; \\ Antti Karttunen, Feb 27 2020

Formula

a(n) mod 4 = 3 - 2 * (n mod 2) for n>1.
For n > 1: a(n) = A111745(n-1).
a(2*n+1) - a(2*n) = A102261(n).
From Antti Karttunen, Feb 27 2020: (Start)
a(1) = 2, a(2n) = A002145(n), a(2n+1) = A002144(n).
a(n) = A000040(A332807(n)).
(End)

A332214 Mersenne-prime fixing variant of permutation A163511: a(n) = A332212(A163511(n)).

Original entry on oeis.org

1, 2, 4, 3, 8, 9, 6, 7, 16, 27, 18, 49, 12, 21, 14, 5, 32, 81, 54, 343, 36, 147, 98, 25, 24, 63, 42, 35, 28, 15, 10, 31, 64, 243, 162, 2401, 108, 1029, 686, 125, 72, 441, 294, 175, 196, 75, 50, 961, 48, 189, 126, 245, 84, 105, 70, 155, 56, 45, 30, 217, 20, 93, 62, 11, 128, 729, 486, 16807, 324, 7203, 4802, 625, 216, 3087, 2058, 875
Offset: 0

Views

Author

Antti Karttunen, Feb 09 2020

Keywords

Comments

Any Mersenne prime (A000668) times any power of 2, i.e., sequence A335431, is fixed by this map (note the indexing), including also all even perfect numbers. It is not currently known whether there are any additional fixed points.
Because a(n) has the same prime signature as A163511(n), it implies that applying A046523 and A052409 to this sequence gives the same results as with A163511, namely, sequences A278531 and A365805. - Antti Karttunen, Oct 09 2023

Crossrefs

Cf. A163511, A332211, A332212, A332215 (inverse permutation).
Cf. A278531 [= A046523(a(n))], A290251 [= A001222(a(n))], A365805 [= A052409(a(n))], A366372 [= a(n)-n], A366373 [= gcd(n,a(n))], A366374 (numerator of n/a(n)), A366375 (denominator of n/a(n)), A366376.
Cf. A000043, A000668, A000396, A324200, A335431 (conjectured to give all the fixed points).

Programs

  • PARI
    A332214(n) = A332212(A163511(n));
    
  • PARI
    \\ Needs precomputed data for A332211:
    v332211 = readvec("b332211_to.txt"); \\ Prepared with gawk ' { print $2 } ' < b332211.txt > b332211_to.txt
    A332211(n) = v332211[n];
    A332214(n) = if(!n, 1, my(i=1, p=A332211(i), t=1); while(n>1, if(!(n%2), (t*=p), i++; p=A332211(i)); n >>= 1); (t*p)); \\ Antti Karttunen, Oct 09 2023

Formula

a(n) = A332212(A163511(n)).

A348744 Lexicographically earliest bijection from primes to odd primes where each prime of the form 4k+1 is mapped to the next larger prime that is of the same form.

Original entry on oeis.org

3, 5, 13, 7, 11, 17, 29, 19, 23, 37, 31, 41, 53, 43, 47, 61, 59, 73, 67, 71, 89, 79, 83, 97, 101, 109, 103, 107, 113, 137, 127, 131, 149, 139, 157, 151, 173, 163, 167, 181, 179, 193, 191, 197, 229, 199, 211, 223, 227, 233, 241, 239, 257, 251, 269, 263, 277, 271, 281, 293, 283, 313, 307, 311, 317, 337, 331, 349, 347
Offset: 1

Views

Author

Antti Karttunen, Nov 02 2021

Keywords

Comments

Terms of A002144 map each to the next term there, as: 5 -> 13 -> 17 -> 29 -> 37 -> 41, etc., and the remaining positions are filled with the terms of A002145: 3, 7, 11, 19, 23, 31, 43, etc., which gives the result that 2 is mapped to 3, 3 is mapped 5, and the rest of 4k+3 primes are fixed.

Crossrefs

Programs

  • PARI
    up_to = 10000;
    A348744list(up_to) = { my(v=vector(up_to), xs=Map(), i=2, p, q); mapput(xs,v[1]=3,1); for(n=2,up_to, p = prime(n); if(1==(p%4), for(k=1+n,oo,q=prime(k);if((1==(q%4))&&!mapisdefined(xs,q),v[n]=q;break)), while(mapisdefined(xs,prime(i)), i++); v[n] = prime(i)); mapput(xs,v[n],n)); (v); };
    v348744 = A348744list(up_to);
    A348744(n) = v348744[n];

Formula

a(n) = A348746(A000040(n)).

A332936 Number of blue nodes in n-th power graph W exponentiation of a cycle graph with 7 blue nodes and 1 green node.

Original entry on oeis.org

7, 51, 387, 2943, 22383, 170235, 1294731, 9847143, 74892951, 569602179, 4332138579, 32948302095, 250590001023, 1905875101899, 14495230812123, 110244221191287, 838468077093927, 6377011953177555, 48500691394138659, 368874495293576607, 2805493888166196879, 21337327619448845211
Offset: 0

Views

Author

George Strand Vajagich, Mar 02 2020

Keywords

Comments

The series of green nodes in n-th power W exponentiation for all n<6 n blue 1 green, 2 edge per node graphs already corresponds with an existing OEIS sequence (empirical). For example the number of blue nodes in n-th power W exponentiation of a square containing 3 blue nodes and 1 green node corresponds to A163063.

Examples

			For n = 2 take g(1)=15 and b(1)=51. Multiply b(1) by 7 to get 357 add 30 to get 387.
For n = 3 take g(2)=117 and b(2)=387. Multiply b(2) by 7 to get 774 add 234 to get 2943.
		

Crossrefs

Cf. A331211.

Programs

  • PARI
    Vec((1 + 43*x - 18*x^2) / (1 - 8*x + 3*x^2) + O(x^40)) \\ Colin Barker, Mar 03 2020
  • Python
    g=1
    b=7
    sg=0
    sb=0
    bl=[]
    gl=[]
    for int in range(1,20):
      sg=g*1+b*2
      sb=b*7+g*2
      g=sg
      b=sb
      gl.append(g)
      bl.append(b)
    print(bl)
    

Formula

g(n) = g(n-1) + 2*a(n-1), a(n) = 2*g(n-1) + 7*a(n-1) with g(0) = 1 and b(0) = 7, where g(n) = A332211(n).
From Colin Barker, Mar 03 2020: (Start)
G.f.: (1 + 43*x - 18*x^2) / (1 - 8*x + 3*x^2).
a(n) = 8*a(n-1) - 3*a(n-2) for n > 1.
(End)
From Stefano Spezia, Mar 03 2020: (Start)
a(n) = ((4 - sqrt(13))^n*(-23 + 7*sqrt(13)) + (4 + sqrt(13))^n*(23 + 7*sqrt(13)))/(2*sqrt(13)).
E.g.f.: exp(4*x)*(91*cosh(sqrt(13)*x) + 23*sqrt(13)*sinh(sqrt(13)*x))/13.
(End)
a(n) = 7*A190976(n+1) -5*A190976(n). - R. J. Mathar, Apr 30 2020
Showing 1-7 of 7 results.