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.

A381803 Number of residues r in {0..n-1} that are not coprime to n and not in row n of A381801.

This page as a plain text file.
%I A381803 #7 Apr 03 2025 22:43:40
%S A381803 0,0,0,0,0,0,0,1,1,0,0,1,0,3,0,4,0,1,0,4,1,0,0,6,3,0,6,8,0,4,0,11,5,8,
%T A381803 0,9,0,0,10,13,0,7,0,9,7,11,0,17,5,3,0,12,0,6,8,21,1,0,0,17,0,25,15,
%U A381803 26,8,15,0,24,11,12,0,29,0,0,7,17,3,22,0,32,23
%N A381803 Number of residues r in {0..n-1} that are not coprime to n and not in row n of A381801.
%C A381803 The intersection of row n of A038566 and row n of A381801 is {1} for n > 1. Therefore most of the terms in row n of A381801 are in row n of A121998 (reading n itself in row n of A121998 instead as n mod n = 0). Thus, a(n) is the number of terms n that are in row n of A121998 but not in A381801.
%H A381803 Michael De Vlieger, <a href="/A381803/b381803.txt">Table of n, a(n) for n = 1..10000</a>
%F A381803 a(n) = 1 + n - phi(n) - A381800(n)
%F A381803      = 1 + n - A000010(n) - A381800(n)
%F A381803      = 1 + A051953(n) - A381800(n)
%F A381803      = A381802(n) - phi(n) - 1.
%F A381803 a(p) = 0.
%F A381803 a(p^m) = p^(m-1) - m.
%e A381803 Let R(n) = row n of A381801 and let S(n) = row n of A121998, where n in S(n) is instead taken mod n.
%e A381803 a(2) = 0 since S(2) = {} and R(2) = {0, 1}; R(2) \ S(2) is empty.
%e A381803 a(4) = 0 since S(4) = {0, 2} and R(4) = {0, 1, 2}; R(4) \ S(4) is empty.
%e A381803 a(6) = 0 since S(6) = {0, 2, 3, 4} and R(6) = {0, 1, 2, 3, 4} is empty.
%e A381803 a(8) = 1 since S(8) = {0, 2, 4, 6} and R(8) = {0, 1, 2, 4} = {6}.
%e A381803 a(9) = 1 since S(9) = {0, 3, 6} and R(6) = {0, 1, 3} = {6}.
%e A381803 a(10) = 0 since S(10) = {0, 2, 4, 5, 6, 8} and R(10) = {0, 1, 2, 4, 5, 6, 8} is empty.
%e A381803   Therefore in base 10, numbers k such that rad(k) | 10 (i.e., k in A003592) may end in any number that is not coprime to 10. (Except 1 ends in the digit one, which is coprime to 10).
%e A381803 a(12) = 1 since S(12) = {0, 2, 3, 4, 6, 8, 9, 10} and R(12) = {0, 1, 2, 3, 4, 6, 8, 9} = {10}.
%e A381803   Therefore in base 12, numbers k such that rad(k) | 12 (i.e., k in A003586) never end in digit 10.
%e A381803 a(14) = 3 since S(14) = {0, 2, 4, 6, 7, 8, 10, 12} and R(14) = {0, 1, 2, 4, 7, 8} = {6, 10, 12}.
%e A381803   Therefore in base 14, numbers k such that rad(k) | 14 (i.e., k in A003591) never end in digits 6, 10, or 12.
%e A381803 a(16) = 4 since S(16) = {0, 2, 4, 6, 8, 10, 12, 14} and R(14) = {0, 1, 2, 4, 8} = {6, 10, 12, 14}, etc.
%e A381803   Therefore in hexadecimal, numbers k such that powers of 2 (i.e., A000079) never end in digits 6, 10, 12, or 14.
%t A381803 f[x_] := Block[{c, ff, m, r, p, s, w},
%t A381803   c[_] := True; ff = FactorInteger[x][[All, 1]]; w = Length[ff];
%t A381803   s = {1};
%t A381803   Do[Set[p[i], ff[[i]]], {i, w}];
%t A381803   Do[Set[s, Union@ Flatten@ Join[s, #[[-1, 1]]]] &@ Reap@
%t A381803     Do[m = s[[j]];
%t A381803       While[Sow@ Set[r, Mod[m*p[i], x]];
%t A381803         c[r],
%t A381803         c[r] = False;
%t A381803         m *= p[i]],
%t A381803        {j, Length[s]}],
%t A381803     {i, w}]; s ];
%t A381803 {0}~Join~Table[1 + n - EulerPhi[n] - Length@ f[n], {n, 2, 120}]
%Y A381803 Cf. A000010, A038566, A051953, A121998, A381800, A381802.
%K A381803 nonn
%O A381803 1,14
%A A381803 _Michael De Vlieger_, Mar 24 2025