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

A289271 A bijective binary representation of the prime factorization of a number, shown in decimal (see Comments for precise definition).

Original entry on oeis.org

0, 1, 2, 4, 8, 3, 16, 32, 64, 5, 128, 6, 256, 9, 10, 512, 1024, 17, 2048, 12, 18, 33, 4096, 34, 8192, 65, 16384, 20, 32768, 7, 65536, 131072, 66, 129, 24, 36, 262144, 257, 130, 40, 524288, 11, 1048576, 68, 72, 513, 2097152, 258, 4194304, 1025, 514, 132
Offset: 1

Views

Author

Rémy Sigrist, Jun 30 2017

Keywords

Comments

For n > 0, with prime factorization Product_{i=1..k} p_i ^ e_i (all p_i distinct and all e_i > 0):
- let S_n = A000961 \ { p_i ^ (e_i + j) with i=1..k and j > 0 },
- a(n) = Sum_{i=1..k} 2^#{ s in S_n with 1 < s < p_i ^ e_i }.
In an informal way, we encode the prime powers > 1 that are unitary divisors of n as 1's in binary, while discarding the 0's corresponding to their "proper" multiples.
a(A002110(n)) = 2^n-1 for any n >= 0.
a(A000961(n+1)) = 2^(n-1) for any n > 0.
A000120(a(n)) = A001221(n) for any n > 0 (each prime divisor p of n (alongside the p-adic valuation of n) is encoded as a single 1 bit in the base-2 representation of a(n)).
A000961(2+A007814(a(n))) = A034684(n) for any n > 1 (the least significant bit of a(n) encodes the smallest unitary divisor of n that is larger than 1).
This sequence establishes a bijection between the positive numbers and the nonnegative numbers; see A289272 for the inverse of this sequence.
The numbers 4, 36, 40 and 532 equal their image; are there other such numbers?
This sequence has connections with A034729 (which encodes the divisors of a number, and is not surjective) and A087207 (which encodes the prime divisors of a number, and is not injective).

Examples

			For n = 204 = 2^2 * 3 * 17:
- S_204 = A000961 \ { 2^3, 2^4, ..., 3^2, ... }
        = { 1, 2, 3, 4, 5, 7, 11, 13, 17, ... },
- a(204) = 2^#{ 2, 3 } + 2^#{ 2 } + 2^#{ 2, 3, 4, 5, 7, 11, 13 }
         = 2^2 + 2^1 + 2^7
         = 134.
See also the illustration of the first terms in Links section.
		

Crossrefs

Cf. also A156552, A052331 for similar constructions.

Programs

  • PARI
    See Links section.
    
  • PARI
    A289271(n) = { my(f = factor(n), pps = vecsort(vector(#f~, i, f[i, 1]^f[i, 2])), s=0, x=1, pp=1, k=-1); for(i=1,#f~, while(pp < pps[i], pp++; while(!isprimepower(pp)||(gcd(pp,x)>1), pp++); k++); s += 2^k; x *= pp); (s); }; \\ Antti Karttunen, Jan 01 2019

A289272 Inverse to A289271.

Original entry on oeis.org

1, 2, 3, 6, 4, 10, 12, 30, 5, 14, 15, 42, 20, 70, 60, 210, 7, 18, 21, 66, 28, 90, 84, 330, 35, 126, 105, 462, 140, 630, 420, 2310, 8, 22, 24, 78, 36, 110, 132, 390, 40, 154, 120, 546, 180, 770, 660, 2730, 56, 198, 168, 858, 252, 990, 924, 4290, 280, 1386, 840
Offset: 0

Views

Author

Rémy Sigrist, Jun 30 2017

Keywords

Comments

a(2^n-1) = A002110(n) for any n >= 0.
a(2^(n-1)) = A000961(n+1) for any n > 0.
A001221(a(n)) = A000120(n) for any n >= 0.
From Antti Karttunen, Jan 01 2019: (Start)
A034684(a(n)) = A000961(1+A001511(n)) for any n >= 1. (See also Rémy Sigrist's comment in A289271).
This sequence can be regarded also as an irregular triangle with rows of lengths 1, 1, 2, 4, 8, 16, ..., that is, it can be represented as a binary tree, where each left hand child contains A322991(k), and each right hand child contains A322992(k), when their parent contains k:
1
|
...................2...................
3 6
4......../ \........10 12......../ \........30
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
5 14 15 42 20 70 60 210
7 18 21 66 28 90 84 330 35 126 105 462 140 630 420 2310
etc.
The leftmost edge is A000961, the next lefmost is A278568 (after 2: 6, 10, 14, 18, ...), the righmost edge is A002110, the next rightmost A088860 but with 3 instead of 4.
Compare also to trees like A005940 (A163511) and A052330.
(End)

Examples

			A289271(1) = 0, hence a(0) = 1.
A289271(2) = 1, hence a(1) = 2.
A289271(3) = 2, hence a(2) = 3.
A289271(4) = 4, hence a(4) = 4.
A289271(5) = 8, hence a(8) = 5.
A289271(6) = 3, hence a(3) = 6.
A289271(7) = 16, hence a(16) = 7.
A289271(8) = 32, hence a(32) = 8.
A289271(9) = 64, hence a(64) = 9.
A289271(10) = 5, hence a(5) = 10.
		

Crossrefs

Programs

  • PARI
    See Links section.
    
  • PARI
    A289272(n) = { my(m=1, pp=1); while(n>0, pp++; while(!isprimepower(pp)||(gcd(pp,m)>1), pp++); if(n%2, m *= pp); n >>=1); (m); }; \\ Antti Karttunen, Jan 01 2019

A322990 a(n) = A289272(floor(A289271(n)/2)).

Original entry on oeis.org

1, 1, 2, 3, 4, 2, 5, 7, 8, 3, 9, 6, 11, 4, 10, 13, 16, 5, 17, 12, 14, 7, 19, 18, 23, 8, 25, 15, 27, 6, 29, 31, 22, 9, 20, 21, 32, 11, 26, 28, 37, 10, 41, 24, 36, 13, 43, 34, 47, 16, 38, 33, 49, 17, 44, 35, 46, 19, 53, 30, 59, 23, 40, 61, 52, 14, 64, 39, 50, 12, 67, 56, 71, 25, 54, 48, 45, 18, 73, 68, 79, 27, 81, 42, 76, 29, 58, 63, 83, 15, 55, 51, 62, 31, 92
Offset: 1

Views

Author

Antti Karttunen, Jan 01 2019

Keywords

Comments

For all n > 1, in the binary tree illustrated in A289272, the node which contains (has value) n, its parent node has value a(n).
Each n occurs exactly twice in this sequence.

Crossrefs

Programs

  • PARI
    A289271(n) = { my(v=0,i=0,x=1); for(d=2,oo,if(n==1, return(v)); if(1==gcd(x,d)&&1==omega(d), if(!(n%d)&&1==gcd(d,n/d), v += 2^i; n /= d; x *= d); i++)); }; \\ After Rémy Sigrist's program for A289271.
    A289272(n) = { my(m=1, pp=1); while(n>0, pp++; while(!isprimepower(pp)||(gcd(pp,m)>1), pp++); if(n%2, m *= pp); n >>=1); (m); };
    A322990(n) = A289272(A289271(n)>>1);

Formula

a(n) = A289272(floor(A289271(n)/2)).

A322991 a(n) = A289272(2*A289271(n)).

Original entry on oeis.org

1, 3, 4, 5, 7, 12, 8, 9, 11, 15, 13, 20, 16, 21, 28, 17, 19, 24, 23, 35, 36, 33, 25, 44, 27, 39, 29, 40, 31, 60, 32, 37, 52, 48, 56, 45, 41, 51, 68, 63, 43, 84, 47, 55, 77, 57, 49, 76, 53, 69, 92, 65, 59, 75, 91, 72, 100, 87, 61, 140, 64, 93, 88, 67, 112, 132, 71, 80, 108, 105, 73, 99, 79, 96, 116, 85, 104, 156, 81, 119, 83, 111, 89
Offset: 1

Views

Author

Antti Karttunen, Jan 01 2019

Keywords

Crossrefs

Permutation of A042965 (apart from zero).
Cf. also A003963, A300841.

Programs

  • PARI
    A289271(n) = { my(v=0,i=0,x=1); for(d=2,oo,if(n==1, return(v)); if(1==gcd(x,d)&&1==omega(d), if(!(n%d)&&1==gcd(d,n/d), v += 2^i; n /= d; x *= d); i++)); }; \\ After Rémy Sigrist's program for A289271.
    A289272(n) = { my(m=1, pp=1); while(n>0, pp++; while(!isprimepower(pp)||(gcd(pp,m)>1), pp++); if(n%2, m *= pp); n >>=1); (m); };
    A322991(n) = A289272(2*A289271(n));

Formula

a(n) = A289272(2*A289271(n)).
Showing 1-4 of 4 results.