login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A367547 Euclid's triangle A217831 represented as binary numbers. 4
0, 11, 10, 110, 1010, 11110, 100010, 1111110, 10101010, 110110110, 1010001010, 11111111110, 100010100010, 1111111111110, 10101000101010, 110100110010110, 1010101010101010, 11111111111111110, 100010100010100010, 1111111111111111110, 10100010101010001010, 110110010110100110110 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
The sequence represents the rows of Euclid's triangle A217831 as unsigned binary integers. If a '0' is prepended to the most significant bit (for n > 1) the terms can also be seen as palindromic binary strings. The decimal representation of the sequence is A367544.
LINKS
MATHEMATICA
A367547[n_]:=FromDigits[Boole[CoprimeQ[n, Range[0, n]]]];
Array[A367547, 30, 0] (* Paolo Xausa, Nov 24 2023 *)
PROG
(SageMath) # For Python include 'import math' for math.gcd.
def A367547(n):
cop = [int(gcd(i, n) == 1) for i in range(n + 1)]
return int(''.join(map(str, cop)))
print([A367547(n) for n in range(22)])
(PARI) a(n) = fromdigits(vector(n+1, i, gcd(i-1, n)==1), 10); \\ Michel Marcus, Nov 24 2023
(Python)
from math import gcd
def A367547(n): return sum(10**k for k in range(n+1) if gcd(n, k)==1) # Chai Wah Wu, Nov 24 2023
CROSSREFS
Sequence in context: A105028 A331560 A014550 * A070836 A063432 A364121
KEYWORD
nonn,base
AUTHOR
Peter Luschny, Nov 22 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 11 06:35 EDT 2024. Contains 375059 sequences. (Running on oeis4.)