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.

A259541 Numbers n such that antisigma(n) is palindromic.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 13, 23, 30, 31, 36, 109, 119, 158, 351, 1645, 1653, 2003, 3476, 3520, 3934, 4913, 8037, 9379, 35324, 36516, 91951, 128955, 200003, 390066, 402603, 1068869, 2000003, 2144992, 2467458, 2867828, 3392245, 3607663
Offset: 1

Views

Author

Paolo P. Lava, Jun 30 2015

Keywords

Comments

Primes of the form 2*10^k+3 belong the sequence (see A177134 and A081677).

Examples

			antisigma(1) = 1*2/2 - sigma(1) = 1 - 1 = 0;
antisigma(13) = 13*14/2 - sigma(13) = 91 - 14 = 77;
antisigma(109) = 109*110/2 - sigma(109) = 5995 - 110 = 5885.
		

Crossrefs

Programs

  • Maple
    with(numtheory): T:=proc(w) local x, y, z; x:=w; y:=0;
    for z from 1 to ilog10(x)+1 do y:=10*y+(x mod 10); x:=trunc(x/10);
    od; y; end: P:=proc(q) local a,n;
    for n from 1 to q do a:=n*(n+1)/2-sigma(n); if a=T(a) then print(n);
    fi; od; end: P(10^9);
  • Mathematica
    palQ[n_] := Block[{d = IntegerDigits@ n}, d == Reverse@ d]; Select[Range@ 4000000, palQ[# (# + 1)/2 - DivisorSigma[1, #]] &] (* Michael De Vlieger, Jul 01 2015 *)
  • PARI
    isok(n) = my(d = digits(n*(n+1)/2 - sigma(n))); Vecrev(d)==d; \\ Michel Marcus, Jul 01 2015