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.

A083829 Palindromes k such that 3k + 1 is also a palindrome.

Original entry on oeis.org

1, 2, 7, 77, 141, 151, 161, 242, 252, 262, 777, 7777, 14041, 14141, 14241, 15051, 15151, 15251, 16061, 16161, 16261, 24042, 24142, 24242, 25052, 25152, 25252, 26062, 26162, 26262, 77777, 777777, 1404041, 1405041, 1406041, 1414141, 1415141
Offset: 1

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 09 2003

Keywords

Comments

From Robert Israel, Feb 23 2023: (Start)
Includes A002281. It appears that the only terms with an even number of digits are in A002281. All other terms of more than 1 digit start with 14, 15, 16, 24, 25 or 26. It also appears that no terms contain the digits 3, 8 or 9, and the only ones that contain 7 are A002281. (End)

Crossrefs

Cf. A083830.

Programs

  • Maple
    ispali:= proc(n) local L;
      L:= convert(n,base,10);
      L = ListTools:-Reverse(L)
    end proc:
    revdigs:= proc(n) local L,i;
      L:= convert(n,base,10);
      add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    palis:= proc(d) local r;
      if d::even then [seq](revdigs(r)+10^(d/2)*r,r=10^(d/2-1)..10^(d/2)-1)
      else [seq](revdigs(floor(r/10))+10^((d-1)/2)*r, r=10^((d-1)/2)..10^((d+1)/2)-1)
      fi
    end proc:
    [seq(op(select(t -> ispali(3*t+1), palis(d))),d=1..7)]; # Robert Israel, Feb 23 2023
  • Mathematica
    Select[Range[15*10^5],AllTrue[{#,3#+1},PalindromeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Feb 14 2018 *)

Extensions

Corrected and extended by Ray Chandler, May 21 2003