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.

A365808 Numbers k such that A163511(k) is a square.

Original entry on oeis.org

0, 2, 5, 8, 11, 17, 20, 23, 32, 35, 41, 44, 47, 65, 68, 71, 80, 83, 89, 92, 95, 128, 131, 137, 140, 143, 161, 164, 167, 176, 179, 185, 188, 191, 257, 260, 263, 272, 275, 281, 284, 287, 320, 323, 329, 332, 335, 353, 356, 359, 368, 371, 377, 380, 383, 512, 515, 521, 524, 527, 545, 548, 551, 560, 563, 569, 572, 575
Offset: 1

Views

Author

Antti Karttunen, Oct 01 2023

Keywords

Comments

The sequence is defined inductively as:
(a) it contains 0 and 2,
and
(b) for any nonzero term a(n), (2*a(n)) + 1 and 4*a(n) are also included as terms.
Because the inductive definition guarantees that all terms after 0 are of the form 3k+2 (A016789), and because for any n >= 0, n^2 == 0 or 1 (mod 3), (i.e., squares are in A032766), it follows that there are no squares in this sequence after the initial 0.

Crossrefs

Cf. A000290, A010052, A032766, A163511, A365807 (characteristic function).
Positions of even terms in A365805.
Sequence A243071(n^2), n >= 1, sorted into ascending order.
Subsequences: A004171, A055010, A365809 (odd terms).
Subsequence of A016789 (after the initial 0).

Programs

  • PARI
    A163511(n) = if(!n, 1, my(p=2, t=1); while(n>1, if(!(n%2), (t*=p), p=nextprime(1+p)); n >>= 1); (t*p));
    isA365808v2(n) = issquare(A163511(n));
    
  • PARI
    isA365808(n) = if(n<=2, !(n%2), if(n%2, isA365808((n-1)/2), if(n%4, 0, isA365808(n/4))));
    
  • Python
    from itertools import count, islice
    def A365808_gen(): # generator of terms
        return map(lambda n:(3*(n+1)>>2)-1,filter(lambda n:n==1 or (n&3==3 and not '00' in bin(n)),count(1)))
    A365808_list = list(islice(A365808_gen(),20)) # Chai Wah Wu, Feb 12 2025