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.

A303818 Representation of the divisor set of n based on parities of divisor and complementary divisor.

This page as a plain text file.
%I A303818 #18 Dec 23 2018 16:13:46
%S A303818 1,3,1,32,1,34,1,32,11,34,1,323,1,34,11,322,1,343,1,324,11,34,1,3232,
%T A303818 11,34,11,324,1,3433,1,322,11,34,11,32342,1,34,11,3223,1,3434,1,324,
%U A303818 111,34,1,32322,11,343,11,324,1,3434,11,3223,11,34,1,323432,1,34,111
%N A303818 Representation of the divisor set of n based on parities of divisor and complementary divisor.
%C A303818 The divisors of n counted in A038548(n) are sorted, each divisor is represented by a digit of 1 to 4, and these digits are concatenated to form the decimals of a(n).
%C A303818 The parity digits are 1,2,3,4 and are mapped as follows:
%C A303818 1: odd factor of an odd number
%C A303818 2: even factor of an even number, paired with an even factor
%C A303818 3: odd factor of an even number
%C A303818 4: even factor of an even number, paired with an odd factor
%C A303818 a(n) gives the significant or first half of the parity of n.
%H A303818 Antti Karttunen, <a href="/A303818/b303818.txt">Table of n, a(n) for n = 1..16384</a>
%H A303818 G. R. Bryant, <a href="http://numbergazing.org/divisor-parity-4/">Divisor 4 Parity</a>
%F A303818 a(odd prime) = 1. - _Michel Marcus_, Jul 05 2018
%e A303818 For n=24, 24 has the following divisors: {1, 2, 3, 4, 6, 8, 12, 24} with the following divisor pairings {{1,24}, {2,12}, {3,8}, {4,6}}.
%e A303818 The first divisor is 1, odd, and paired with an even, so we have: 3;
%e A303818 the second divisor is 2, even, and paired with an even, so we have: 2;
%e A303818 the third divisor is 3, odd, and paired with an even, so we have: 3;
%e A303818 the fourth divisor is 4, even, and paired with an even, so we have: 2.
%e A303818 That gives us the significant portion of the parity as 3232. (The full parity would include the complement and be 32322424.)
%t A303818 Table[FromDigits[Map[Boole[OddQ@ #] & /@ {#, n/#} &, Take[#, Ceiling[Length[#]/2]] &@ Divisors@ n] /. {{1, 1} -> 1, {0, 0} -> 2, {1, 0} -> 3, {0, 1} -> 4}], {n, 100}] (* _Michael De Vlieger_, May 03 2018 *)
%o A303818 (PARI) par(d, nd) = if (d % 2, if (nd % 2, 1, 3), if (nd % 2, 4, 2));
%o A303818 a(n) = my(s=""); fordiv (n, d, if (d <= n/d, s = concat(s, par(d, n/d)))); eval(s); \\ _Michel Marcus_, Jul 05 2018
%Y A303818 Cf. A247795.
%K A303818 nonn,base
%O A303818 1,2
%A A303818 _Gregory Bryant_, Apr 30 2018